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

Mouse up event not fired in GirdGroupingControl

Hi All, I am using GirdGroupingControl and also PopupMenuManager. When I right click on single row, itz working fine. When Click left mouse button and move mouse over the grid (with left button in cliked position) I am able to selected multiple rows. When I leave the button (left mouse button up), I want to handle some operations. But I am not getting the mouse up event at all. I tried with gridGroupingContro_MouseUp and GridGroupingContro_TableControlCellMouseUp events but they are not fired. I tried to even handle some Cell activating and de-activating events. Can any one plz tell me how to handle these kind of mouse-ups? Rgds Rajani Kanth

3 Replies

AD Administrator Syncfusion Team October 28, 2005 09:50 AM UTC

What record selection are you using, the one iherited from GridControlBase (where you set TableOptions.AllowSelections to somthing other than None) or the special selection support in GridGroupingCOntrol (where you set TableOptions.AllowSelections to None and tableOptions.ListBoxSelectionMode to something other than None). If you are using the first type of selection support, you can catch the mouseup by handling the this.gridGroupingControl1.TableModel.SelectionChanged (or Changing) event.
private void TableModel_SelectionChanged(object sender, GridSelectionChangedEventArgs e)
{
	if(e.Reason == GridSelectionReason.MouseUp)
	{
		Console.WriteLine("TableModel_SelectionChanged");
	}
}
For the second type of selection, I could not see an obvious way to catch the mouse up.


BR Badri Rajani Kanth October 28, 2005 02:22 PM UTC

We are using ListBoxSelectionMode other than NONE option. SO still we are unable to handle that. Also, we have two grid controls with same table options properties. I mean ListBoxSelectionMode other than NONE and TableOptions.AllowSelections to NONE. But in one control we are able to select multiple rows using SHIFT/Control keys and mouse clicks. In other control always only one row. ANy idea why is this happening..we have even done diff usiing tools but could not find any. Rgds Rajani Kanth >What record selection are you using, the one iherited from GridControlBase (where you set TableOptions.AllowSelections to somthing other than None) or the special selection support in GridGroupingCOntrol (where you set TableOptions.AllowSelections to None and tableOptions.ListBoxSelectionMode to something other than None). > >If you are using the first type of selection support, you can catch the mouseup by handling the this.gridGroupingControl1.TableModel.SelectionChanged (or Changing) event. >
>private void TableModel_SelectionChanged(object sender, GridSelectionChangedEventArgs e)
>{
>	if(e.Reason == GridSelectionReason.MouseUp)
>	{
>		Console.WriteLine("TableModel_SelectionChanged");
>	}
>}
>
> >For the second type of selection, I could not see an obvious way to catch the mouse up.


AD Administrator Syncfusion Team October 28, 2005 03:09 PM UTC

If you have TableOptions.AllowSelection and TableOptions.ListBoxSelectionMode set the same in both grids, then in the grid where the multiple selections do not work, you might look for any events that affect the mouse behavior. If you have any, you could try commenting them out to see if any of them are affecting this behavior. You could also check to see if you have set the SelectCellsMouseButtonsMask property in either grid. If you can upload a sample project showing the problem, we can try to spot the problem here.

Loader.
Live Chat Icon For mobile
Up arrow icon