What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 1344 |  Welcome, Guest!   Register  Login
 Home > Code Snippets > ASP.NET AJAX > how to bind dynamically Gridview ...
Jayakumars

how to bind dynamically Gridview

 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
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

More codes snippets

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/25/2013 7:51:10 AM