Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Way to unselect/select all checkboxes in datagrid

Status
Not open for further replies.

abraxas

Programmer
Jan 15, 2001
75
AU
Hi All,
I need some advice on how to check or uncheck all checkboxes in the displayed winform datagrid. I've found much ASP orientated doco including AllowSelectAll property (which doesn't show in MSDN 2003). Is there some column property to allow this or do I just loop through the datagrid contents and set the values true/false? If the latter could someone walk me through the process please.

I have mouse_down event context menus with options enabled depending on the particular column right clicked.

Much obliged
abraxas
 
Ok, managed to cobble together a functional way of doing this using Hittest, mappingnames and a loop dg[row, 6] = true,
(and check boxes display checked) but this seems to fail whatever event datagrid uses to update dataset. They don't Update!

When one modifies a datagrid cell, what default events are raised? If I dg[6, 6] = true (modify that cell programatically) and modify cell 6, 6 manually, how are they different?

Abraxas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top