Skip to content

To Add a CheckBox Column at the 0th Position in the DataGrid which is Filled using DataSource at runtime in Win Form

Varsha Ramnani

Asked Sep 10, 2008, 11:45 PM EDT1 answer
Share
LinkedInX

Hi All,

I want to add a CheckBox Column at the 0th Column in DataGrid in Window Application ........

my DataGrid is Filled using DataSet so, it is Bound .........

Also , I Dont the Type & No of Columns that will be set thru DataSet..........

So, Any Idea How can I do this ......

Also, I thought Something like I Add a CheckBox Column at Design time & then at Runtime I Set the DataSource ......

So, is there any Property using which i can retain the Design time Columns & then set the DataSource ....

So that I can see the Columns which were set at Design time And Runtime thru DataSet both..........

Guys........ Its really Urgent

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    Hi, you can do so. Just add a template field in your datagrid. In the template field add a checkbox there. Then go to the properties of the datagrid and set the autogenerate columns to true. At the codebehind part just bind your data to the datagrid. I think you will get the required result.
    +1