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
490
Selected Items and Active Items -- problems with selection model
posted

Hello,

I'm struggling to work with the Selected and Active items provided by the Grid to provide the selection model I would like to give my users.  The grid itself has some editable (text and dropdown entry) and non-editable columns and I would like to have a selection model that provides for both single and multiple row selections (via clicking and click-dragging) regardless of the type of cell that they click on (e.g. - clicking on an editable cell should select the row just as clicking on a non-editable cell would).

I do not want cells to become editable when a user clicks on them but rather when they TYPE.  So, it forces me to set the CellActivation to CellSelect (rather than RowSelect) so that, when they begin to type, I can tell which cell they are using.

As a result, if they have selected RowA by clicking on a non-editable cell and then they immediately click on an editabe-cell in RowB ... RowB becomes active (and the cell they clicked on becomes the selected cell) but RowA stays the selected row.  There are similar problems if they have multi-selected a bunch of rows and then click on an editable cell of a single row.  In that case, the multiple selection should disappear and be replaced by the row corresponding to the cell they just clicked on.

I can work around this problem by checking for changes in both the current selected items and the active row (via AfterRowActivate).  If there are 3 rows selected and then the active row changes - this implies the user has gone from a multi-select to a single select via some means.  But this too breaks down because as the users drags to select multiple rows, the active row continually updates so I can't tell if they mean to select multiple rows or a single row at that point.

Has anyone else implemented something similar to this and have any suggestions?

Thanks in advance!

Parents Reply Children
No Data