[Closed] Checkbox in DotNet Datagrid
Hi There,
Can anybody help me with adding a checkbox column in a Dotnet Datagrid View.
Thankyou
Here’s a quick example:
Try DestroyDialog ExampleDialog Catch OK
Rollout ExampleDialog "Example"
(
DotNetControl dgv "System.Windows.Forms.DataGridView" pos:[0,0] width:300 height:200
on ExampleDialog open do
(
-- Add Column
pColumn = DotNetObject "System.Windows.Forms.DataGridViewCheckBoxColumn"
pColumn.name = "Test"
dgv.Columns.Add pColumn
)
)
CreateDialog ExampleDialog width:300 height:200
Documentation here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.aspx
Thanks, that was good explanation. This time i dint receive a mail from CG talk that i got replies for my post. So i thought nobody responded. Today i logged in and checked and was surprised to see the replies.
I was able to add a checkbox column somehow. I have a datagrid view with one column bound to the datatable and now i want to add 2 more columns added to the grid view after the bound column. I got it added but it always appears before the bound column. One column is going to be a checkbox column and the other one a button column.
Thanks for the replies again friends.