how to add checkbox column in datagrid
-
i want to add first column of datagrid as checkedbox against every row of datagrid. then from the list i will select some checkboxes according to need.how i will implement this thing plz tell me any simple way. reply soon.
-
yes i have tried all even i read many articales in codeproject also. they are very complex and webbased. i dont understand them i read one artical http://www.codeproject.com/aspnet/ChkBoxInGrid.asp i want to do the same thing but in windows form. i dont understand how to bind checkbox with datagrid.and i want to display checkboxe with every row of datagrid. so plz help me
-
yes i have tried all even i read many articales in codeproject also. they are very complex and webbased. i dont understand them i read one artical http://www.codeproject.com/aspnet/ChkBoxInGrid.asp i want to do the same thing but in windows form. i dont understand how to bind checkbox with datagrid.and i want to display checkboxe with every row of datagrid. so plz help me
To add a checkbox column just open the Column designer and add a column of type
DataGridViewCheckBox
. If you want to perform the selecting and deselecting etc, why you can just use Control and Shift combinations to achieve the same thing. There should be a property calledSelectedRows
so you can enumerate them.As of how to accomplish this, have you ever tried Google?