How to find RowIndex

Hi,

I am using GridControl in my project.The row count is 3.

When user selects portion of a row then, I have raised SelectionChanged Event for GridControl.In called method, I need to check which row user has selected.
so, Kindly let me know how I get the row Index in the called method.

Thanks,
Deepa

1 Reply

LS Lingaraj S Syncfusion Team May 7, 2009 03:37 PM UTC

HiDeepa,

Thank you for your interest in Syncfusion product.

The GridControl selection rows are stored as a Ranges. If you want the selected row in GridControl, please try using GetSelectedRanges method to achieve this behaviour.

Please refer the code below:

GridRangeInfoList gridRangeInfoList = null;
this.grid.Model.Selections.GetSelectedRanges(out gridRangeInfoList, true);
GridRangeInfo info = gridRangeInfoList.ActiveRange;
if (info != null && info.IsRows)
{
MessageBox.Show("Top " + info.Top.ToString() + " Bottom " + info.Bottom.ToString());
}


Let me know if you have any queries.

Regards,
Lingaraj S.

Loader.
Up arrow icon