Dynamic Controls Added.- gridview in Run Time

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 1207
I have Post the Code
Dynamic Controls Added.- gridview in Run Time
==================================================

if (e.Row.RowType == DataControlRowType.DataRow)
{
TextBox txt = new TextBox();
txt.ID = "TxtName";
txt.Text = "Name";
e.Row.Cells[1].Controls.Add(txt);

CheckBox rad = new CheckBox();
rad.ID = "rad1";
rad.Text = "Male";
e.Row.Cells[0].Controls.Add(rad);
}

Comments or Responses

Login to post response