.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Code Snippets >> DataGrid >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Adding Button in DataGrid RunTime

Posted By:Rajshree       Posted Date: October 28, 2010    Points: 15    Category: DataGrid    URL: http://www.dotnetspark.com  

You can add a button in a datagrid column on runtime

How to add button in datagird see:-

Create a instance/object of  DataGridViewButtonColumn Class then

Initialize in COnstructor

and do that code shows below:

like if we have a object like this DataGridViewButtonColumn dgbtn;

in COnstructor:

dgbtn=new DataGridViewButtonColumn();


dgbtn.Text="Click Me";



//demodatagrid object or instance of datagrid.




Thanks you

If any query so u can contact me thanks you


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend