Code Snippet posted by:
Jayakumars | Posted on: 10/6/2012 | Category:
ASP.NET AJAX Codes | Views: 516 | Status:
[Member] |
Points: 40
|
Alert Moderator
hi
I have just button click event both column in same name bind generate datatable and boundfield
protected void Button1_Click(object sender, EventArgs e)
{
dt.Columns.Add("Name");
DataRow dr = dt.NewRow();
dr[0] = "Jesus";
dt.Rows.Add(dr);
BoundField BFiled1 = new BoundField();
BFiled1.HeaderText = "Name";
BFiled1.DataField = "Name";
grd1.Columns.Add(BFiled1);
grd1.DataSource = dt;
grd1.DataBind();
}
Mark as Answer if its helpful to you
Regards
Email Id: kumaraspcode2009@gmail.com