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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC: Move highlighted Record with mouse

Thread ID:





59522 Apr 16,2007 03:43 PM UTC Apr 16,2007 04:03 PM UTC WinForms 1
Tags: GridControl
Falk Neumann
Asked On April 16, 2007 03:43 PM UTC


When I move the mouse over a GGC, I want to move the currently highlighted RecordRow with it. How can this be managed? Is there a property that solves this problem? Or do I need to manage the Highlighting manually?


haneefm [Syncfusion]
Replied On April 16, 2007 04:03 PM UTC

Hi Falk,

One way you can do this by turn ON the record based selection technique and then handle the MouseMove event of the GridTableControl to add/remove the mouse moveover record using the Table.SelectedRecords property. Here is a code snippet to show this.

//Turn ON Record - based selection.
this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended;
//Turn OFF Cell - based selection.
this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None;

this.gridGroupingControl1.TableControl.MouseMove +=new MouseEventHandler(TableControl_MouseMove);

Record LastRec = null;
private void TableControl_MouseMove(object sender, MouseEventArgs e)
GridTableControl tc = sender as GridTableControl;
Point pt = new Point(e.X,e.Y);
Element el = tc.PointToNestedDisplayElement(pt);
if( el.Kind == DisplayElementKind.Record)
Record rec = el.GetRecord();
if( LastRec != null )
if( rec != null )
LastRec = rec;

Sample : GGCMouseMove.zip

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon