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
close icon

RowLeave Event in GDBG

Hi,
I want to be notify when the current position in a gdbg (bounded with a datatable) is changing and have the origin row and the target row index.

The rowleave event works fine but it doesn't give the target row index !

Thanks for your help.
Simon

1 Reply

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

Loader.
Live Chat Icon For mobile
Up arrow icon