AD
Administrator
Syncfusion Team
November 1, 2006 05:13 AM UTC
Hi Simon,
Using RowEnter Event:
You can handle the RowEnter event to find the target row in a grid. Here is a code snippet
private void gridDataBoundGrid1_RowEnter(object sender, Syncfusion.Windows.Forms.Grid.GridRowEventArgs e)
{
Console.WriteLine("gridDataBoundGrid1_RowEnter Target Row : " + e.RowIndex);
}
Using CurrentCellMoving Event:
You can use the CurrentCellMoving event to get the origin row and target row in a grid. Please find the code snippet below.
private void gridCurrentCellMoving(object sender, GridCurrentCellMovingEventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if(cc.MoveToRowIndex != cc.MoveFromRowIndex)
{
Console.WriteLine("Origin Row: " + cc.MoveFromRowIndex);
Console.WriteLine("Target Row: " + cc.MoveToRowIndex);
}
}
Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GDBGrowEnterLeave_991f0e6d.zip
Best Regards,
Haneef