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

GridDataboundGrid Selected Rows

Thread ID:





94106 Apr 21,2010 04:30 PM UTC Apr 28,2010 08:34 AM UTC WinForms 1
Tags: GridControl
Asked On April 21, 2010 04:30 PM UTC

How can i get selected row in a griddataboundgrid.

Christopher Issac Sunder K [Syncfusion]
Replied On April 28, 2010 08:34 AM UTC

Hi Santhosh,

Thank you for your interest in Syncfusion products.

To get the selected rows, you can make use of this.gridDataBoundGrid1.Model.Selections.GetSelectedRows(false, true) to achieve it. The code is as follows,

GridRangeInfoList list = this.gridDataBoundGrid1.Model.Selections.GetSelectedRows(false, true);
foreach (GridRangeInfo range in list)
for (int i = range.Top; i <= range.Bottom; i++)
GridBoundRecordState rs = this.gridDataBoundGrid1.Binder.GetRecordStateAtRowIndex(i);
DataRowView drv = (DataRowView)(rs.Table[rs.Position]);
DataRow dr = drv.Row;
string row = "";
object[] SelectedRow = dr.ItemArray;
for (int j = 0; j < SelectedRow.Length; j++)
row +=(string) SelectedRow[j] + " ";
richTextBox1.Text = row;

Please refer the sample link which gives you the solution to get the selected row.


Please let me know if you have any further concerns.

Christopher K.


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