Click here to Skip to main content
14,388,705 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi

I can add DataGridViewButtonColumn to datagridview in design but I want to do that at runtime.

Mean I want to add a DataGridViewButtonColumn at runtime.

What can I do?

I am sorry for bad writing.
Posted
Updated 26-Mar-11 11:59am
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

The DataGridViewButtonColumn page on MSDN[^] shows how to add columns at runtime.

You might also find this page[^] useful.
   
v2
Comments
Wendelius 26-Mar-11 17:03pm
   
I was just about to post the same link :) 5'd
Rate this:
Please Sign up or sign in to vote.

Solution 2

To add to Henry Minute's answer, if you write the class (DataGridViewButtonColumn) into the editor in Visual Studio and press F1 you'll get the same page.
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

Hi

Google is always good friend of you to find solutions like this problems. see google results [^]

Some links

Dynamic Template Columns in the ASP.NET 2.0 GridView Control[^]

To-add-new-datagridviewbutton-column-in-a-databound-datagridview-at-runtime[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100