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 )
tc.Table.SelectedRecords.Remove(LastRec);
if( rec != null )
{
tc.Table.SelectedRecords.Add(rec);
LastRec = rec;
}
}
}
Sample :
GGCMouseMove.zipBest regards,
Haneef