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

GridListControl get all selected rows

Thread ID:





77252 Oct 22,2008 06:10 PM UTC Oct 23,2008 03:11 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On October 22, 2008 06:10 PM UTC

I want to be able to get all the selected rows from a gridlistcontrol. I cannot seem to find anyway of doing this. Can anyone help me?

Nirmal Raja [Syncfusion]
Replied On October 23, 2008 03:11 PM UTC


The GridListControl can be made muliselection using a property called SelectionMode property that has to be set as MultiExtended.
And using Grid.SelectionRanges we can get the range of selected rows from the GridListBox.

Please refer the below code snippet:
private void GridListBox1_SelectedValueChanged(object sender, EventArgs e)
if (GridListBox1.SelectedIndex != -1)
for (int i = GridListBox1.Grid.Model.SelectedRanges.ActiveRange.Top; i <= GridListBox1.Grid.Model.SelectedRanges.ActiveRange.Bottom; i++)
if (i != 0)
Console.WriteLine(GridListBox1.Items[i - 1].ToString());

Let me know if you have any queries.



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