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

Selected Records on GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

64289 Jul 17,2007 10:41 PM UTC Jul 17,2007 11:24 PM UTC WinForms 1
loading
Tags: GridControl
Nathaniel Quillen
Asked On July 17, 2007 10:41 PM UTC

Is there an easy way to get the selected records while using a filterbar in the gridGroupingControl.

I tried:
List intList = new List();

//Get the selected rows from the groupin grid.
GridRangeInfoList range = this.gridGroupingControl1.TableModel.Selections.GetSelectedRows(true, true);
range = range.Expand(1, 1, grid.RowCount, grid.ColCount);
foreach (GridRangeInfo info in range)
{
if (info.IsRows)
{
for (int i = info.Top; i <= info.Bottom; i++)
{
if (i - 3 >= 0)
intList.Add(i - 3);
}
}
}

return intList.ToArray();

This properly return the index of the record if it has been filtered but then if i use that index on the Table.Records which is unfilterd and it selects the wrong one.

is there a way to access the filtered collection or have this return the unfiltered indexes?


haneefm [Syncfusion]
Replied On July 17, 2007 11:24 PM UTC

Hi,

Is there an easy way to get the selected records while using a filterbar in the gridGroupingControl.
>>>>>>>>>>>>>>>>>
Yes, you can get the selected records collection from the GridTable property. Below is a code.

foreach(SelectedRecord rec in this.grid.TableModel.Table.SelectedRecords)
{
Console.WriteLine(rec.Record);
}

Is there a way to access the filtered collection or have this return the unfiltered indexes?
>>>>>>>>>>>>>>>>>
You can try these code:

foreach(Record rec in this.grid.TableModel.Table.FilteredRecords)
{
Console.WriteLine(rec);
}

Best regards,
Haneef

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.

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

;