Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
Can a grid with SelectedCells and SelectedRows be achieved?
posted

I am looking for ideas on how to achieve the following type of selection behavior on an Ultragrid.

My grids typically have SelectTypeRow = Extended, SelectTypeCell = None and SelectTypeCol = None and the CellClickAction = RowSelect.  This works well, however it's not very convenient when users want to copy values from just a few cells (not entire rows). 

I want to allow users to select cells, have those cells exposed via the SelectedCells property AND have all rows that contain a selected cell also be considered selected and be exposed via the SelectedRows property.  During a Copy operation I would copy the values of the SelectedCells to the clipboard.  If the user wanted to copy the entire row to the clipboard, they would have to select all the cells in the row. 

I know I can set the SelectTypeCell to Extended and change the CellClickAction to CellSelect, but this results in SelectedCells only (no rows are selected).  I want to have a grid that can have SelectedCells and SelectedRows at the same time. Any ideas on how to achieve this type of behavior?