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.
Unfortunately, activation email could not send to your email. Please try again.

How to find RowIndex

Thread ID:

Created:

Updated:

Platform:

Replies:

81002 May 7,2009 01:27 AM May 7,2009 11:37 AM Windows Forms 1
loading
Tags: GridControl
Deepasri
Asked On May 7, 2009 01:27 AM

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

Lingaraj S [Syncfusion]
Replied On May 7, 2009 11:37 AM

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.

CONFIRMATION

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.

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.

;