DataGrid Multi-Select issue

Delphy

Newcomer
Joined
Mar 29, 2007
Messages
1
Hi All,

Okay I've been banging my head against a wall for a day now trying to come up with a what appears to be a simple solution to the following question: How do you allow multi-selection of rows while clicking on the cells?

In a normal DataGrid you can select multiple rows by holding down Ctrl or Shift and clicking in the Left side Column bar.

There is code available that allows you to select the entire row when you click on an individual cell, but this doesn't replicate the functionality of clicking inside the RowHeaders (ie the usual Ctrl-Click to select) - it always selects only a single row and then de-selects everything else.

What I would like to do is the following:
- Allow the user to click in any cell (the entire dataGrid is read-only), and then it selects the whole row
- Hold down Ctrl- or Shift- and click on another cell and it acts like a multi-select and selects, well, multiple rows.

Anybody got any advice becuase I'm rapidly losing hair over this ;)

Regards
Delphy
 
I think you would need to use the code that works to select a single row and add it to an array. Then every time the Click() event fires, add the single row you detected to the array.
 
Back
Top