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

virtual grid - capturing selected row changed

Thread ID:





52486 Nov 29,2006 12:43 PM UTC Nov 30,2006 05:00 AM UTC WinForms 1
Tags: GridControl
Adam K.
Asked On November 29, 2006 12:43 PM UTC

i want to be able to capture an event from the grid when the user changes selected rows.

which event from the grid should i listen to capture this here ?

I tried using the selection changed event but the first time the user clicks on the grid the value or rowIndex is -1 which doesn't help much.

Again, my requirement is to simply have an event raised when a user changes rows. In the callback of that event, i would like to know the current row selected. Any ideas? Can you send me an example.


Administrator [Syncfusion]
Replied On November 30, 2006 05:00 AM UTC

Hi Adam,

You can handle the CurrentCellMoved event and use Selections.Ranges.AnyRangeContains() method to determine the current row selection in a grid. Here is a code snippet

private void gridControl1_CurrentCellMoved(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellMovedEventArgs e)
GridControl grid = sender as GridControl;
GridCurrentCell cc = grid.CurrentCell;

if( grid.Model.Selections.Ranges.AnyRangeContains(GridRangeInfo.Row(cc.RowIndex)))
Console.WriteLine("CurrentRowNo: {0} Selected", cc.RowIndex );

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