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
525
Multiple row selection is kind of flaky
posted

The selectrowtype of my grid is "Extended select w/Auto drag". When I select a range of rows, for instance 5 rows using auto drag. And then select one more row which is not in the range say...I select a row after 2 rows using ctrl + click. 

When I programmatically see the number of selected rows...the count is 5. The last row I selected using ctrl+click is not part of that collection. 

Is this a bug?

-N

Parents
No Data
Reply
  • 69832
    Offline posted

    neelimagangishetty said:
    When I programmatically see the number of selected rows...the count is 5. The last row I selected using ctrl+click is not part of that collection. 

    One possible explanation for this would be that you are checking the count of the UltraGrid.Selected.Rows collection in a handler for the UltraGrid.BeforeSelectChange event. At the time the BeforeSelectChange event fires, the UltraGrid.Selected.Rows collection has yet to be updated, since a listener can cancel the selection change. If this is the case you can use the e.NewSelections.Rows collection instead; this represents what the selection will become if the event is not canceled.

Children
No Data