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

RowLeave Event in GDBG

Thread ID:





51208 Oct 31,2006 02:42 PM UTC Nov 1,2006 05:13 AM UTC WinForms 1
Tags: GridControl
Simon Kakon
Asked On October 31, 2006 02:42 PM UTC

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.

Administrator [Syncfusion]
Replied On 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.

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