Hello,
I have a RadGridView with an handler for the SelectionChanged event. MultiSelect is enabled. If I hold the mouse button and move the mouse to select rows, the event is triggered as expected. However, if I keep holding the mouse button and move the mouse back to select less rows, the event is not triggered! It seems to me that this is an error in the RadGridView.
I use this functionality to update a label with the number of selected rows, which is not updated correctly this way. Is there a way that I could make this work?
Below is a code snippet that shows my problem.
I have a RadGridView with an handler for the SelectionChanged event. MultiSelect is enabled. If I hold the mouse button and move the mouse to select rows, the event is triggered as expected. However, if I keep holding the mouse button and move the mouse back to select less rows, the event is not triggered! It seems to me that this is an error in the RadGridView.
I use this functionality to update a label with the number of selected rows, which is not updated correctly this way. Is there a way that I could make this work?
Below is a code snippet that shows my problem.
int
previousSelectedItemCount;
private
void
rgvObjecten_SelectionChanged(
object
sender, EventArgs e)
{
if
(previousSelectedItemCount > rgvObjecten.SelectedRows.Count)
{
// this is not reached
}
previousSelectedItemCount = rgvObjecten.SelectedRows.Count;
// code to update label here
}