Checkbox in Datagrid
-
:confused: Hi all, I've been trying to have a simple checkbox in my datagrid using C# and it's being a pain to get it to work. Here is the cenario. I have a DataSet populated with a table "Employees" let's say. This table has fields such id, name, email. All I want to do is to display an extra column in my datagrid that will display a checkbox for each row. Note, there is no data associated with this checkbox. I just wanted the user to select some of the Employees from the datagrid by checking the checkbox. Then, when they click the button "Print", I will loop through the datagrid, get the selected ones and print. Anyone can give me some instructions or example of how to do that? I've been looking some people examples that do something similar. But they don't really show how to add an extra column to the datagrid with a checkbox for each record of your already populated dataset. Please, any help will be appreciated. Thanks to all. Anderson Anderson F. afraga22@hotmail.com
-
:confused: Hi all, I've been trying to have a simple checkbox in my datagrid using C# and it's being a pain to get it to work. Here is the cenario. I have a DataSet populated with a table "Employees" let's say. This table has fields such id, name, email. All I want to do is to display an extra column in my datagrid that will display a checkbox for each row. Note, there is no data associated with this checkbox. I just wanted the user to select some of the Employees from the datagrid by checking the checkbox. Then, when they click the button "Print", I will loop through the datagrid, get the selected ones and print. Anyone can give me some instructions or example of how to do that? I've been looking some people examples that do something similar. But they don't really show how to add an extra column to the datagrid with a checkbox for each record of your already populated dataset. Please, any help will be appreciated. Thanks to all. Anderson Anderson F. afraga22@hotmail.com
You can add an unbound column to your datagrid and use a bool columnstyle for that unbound column. You can download a sample showing how to add an unbound column from: http://www.syncfusion.com/FAQ/WinForms/FAQ\_c44c.asp#q787q Clay Burch www.syncfusion.com
-
You can add an unbound column to your datagrid and use a bool columnstyle for that unbound column. You can download a sample showing how to add an unbound column from: http://www.syncfusion.com/FAQ/WinForms/FAQ\_c44c.asp#q787q Clay Burch www.syncfusion.com
Hello Clay, Thanks a lot. That's a pretty good link. I will try it and I let you know when I get it to work. Thanks again. Anderson Anderson F. afraga22@hotmail.com