David Svedarsky
asked on
Clear datagridview checkbox column with button click
VB.Net 2005
I need sample code to clear datagridview checkbox column with button click event.
I need sample code to clear datagridview checkbox column with button click event.
sorry submitted by accident
for each r as DataGridViewRow in datagridview1.rows
'this next bit depends on the type of object bound to the gridview
r.DataBoundItem.Item("chec kboxcolumn ") = False 'if bound to a table
CType(r.DataBoundItem, objectType).propertyname = False 'if bound to a type of object
next
for each r as DataGridViewRow in datagridview1.rows
'this next bit depends on the type of object bound to the gridview
r.DataBoundItem.Item("chec
CType(r.DataBoundItem, objectType).propertyname = False 'if bound to a type of object
next
ASKER
Solar_Flare,
Doesn't seem to work - locks the form up.
I tried:
r.DataBoundItem.SelectedCo lumns.Item ("checkbox column") = False 'if bound to a table
still doesn't work.
Doesn't seem to work - locks the form up.
I tried:
r.DataBoundItem.SelectedCo
still doesn't work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solar_Flare,
That did the trick.
Thanks,
Dave
That did the trick.
Thanks,
Dave
for each r as DataGridViewRow in datagridview1.rows
'this next bit depends on the type of object bound to the gridview
r.DataBoundItem
next