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. Image for the cookie policy date
close icon

GridGroupingControl get selected rows

I have a gridgroupingcontrol instance and have set the properties to allow the user to select multiple rows. I plan on capturing a keypress (Ctrl-c) and when that fires need to get all the rows that the user has selected.

I can not see where to get this information...where do I get all the currently selected rows?

1 Reply

AD Administrator Syncfusion Team July 27, 2006 05:37 AM UTC

Hi Rich,

You can get the selected rows in the grid, by hooking to the SelectedRecordsChanged event of the gridgroupingcontrol. Please make sure that you have set the ListBoxSelectionMode to some thing other than none and AllowSelection property to None. This will enable the record based selection support for the grid.

this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended;
this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.None;

// SelectedRecordsChanged event
if( e.SelectedRecord != null )
{
Console.WriteLine( e.SelectedRecord.Record );
}
// To get the number of selected records
Console.WriteLine( e.Table.SelectedRecords.Count );

Also, take a look into this forum thread
http://www.syncfusion.com/Support/forums/message.aspx?MessageID=30313

Let me know if you have any other questions.
Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon