We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Weird behavior when handling multiple row selection with the grid.

I would like to be able to determine the rows in a selection only after I''ve let go of the mouse button, i.e., GridSelectionReason.MouseUp. Currently I can do that by handling SelectionChanged, but it fires once each time for every row that was selected, which is weird. It seems logical that the MouseUp reason on a selection changed event should only occur on the last row in the selection, but that doesn''t seem to be how the GridControl handles selection changing events. Thoughts on this?

1 Reply

AD Administrator Syncfusion Team April 21, 2004 12:26 PM

When a new row is added to the Selections, then the Selections are changing (For example, you could be trying to listen to the changing so you can ''specially color'' the selections. If this what you need, then you would want to see the event on every row change). In SelectionsChanged, you could dynamically test Control.MouseButtons == MouseButtons.Left to pick out the case when you have not ''finished'' selections yet (ie, the mouse still down). maybe this would give you what you need.

Loader.
Live Chat Icon For mobile
Up arrow icon