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
2395
Allow row multiselect with cellclickAction set to CellSelect?
posted

So I've run into an issue that seems like it should have a simple solution, but I'm still having problems. I want to allow multiselection on a grid, but maintain the behavior of having an active row and active cell.

For example, setting grid.DisplayLayout.Override.CellClickAction = CellClickAction.CellSelect sets an active cell and row on whatever the user click on in the grid. Then to allow multiselect, I set grid.DisplayLayout.Override.SelectTypeRow = SelectType.Extended;

My problem here is that this does not do what I except, which is clicking and dragging on the grid will select rows, and allow for the last row that the user clicks on is activated. The only way to get this behavior is to change the CellClickAction to RowSelect, which defeats my original purpose of allowing cell activation.

So here's what I need to be able to do:
-Keep activecell and active row on the last place that the user clicks
-on click and drag, all rows spanned should be selected.

Is there a simple way to do this without handling mouse events?

  • 469350
    Suggested Answer
    Offline posted

    No, if you are clicking and dragging to select rows, then the grid will be in a sort've row-selection mode and there won't be an ActiveCell.