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

Gridlist Control C#

Thread ID:





84519 Jul 1,2009 06:36 AM UTC Jul 10,2009 11:53 AM UTC WinForms 1
Tags: GridControl
Asked On July 1, 2009 06:36 AM UTC

Hi there,

I would appreciate any help with the following regarding GridList Control:

The user should be able to select various rows (1 or many), then I need a way to programmatically determine which rows are selected.
I will be using a context menu on the grid, so I need to find which ones are selected at that point using C#.

Lingaraj S [Syncfusion]
Replied On July 10, 2009 11:53 AM UTC

Hi Brandon,

Thank you for your interest in Syncfusion product.

If you want to get the selected row in GridListControl, then please try using GetSelected method in Items property to achieve this behavior. The GetSelected method is used to check the whether the row index was selected or not. The row is selected then it will return the True value.

Refer the code below:

this.label2.Text = "";
int count=0;
for (int i = 0; i < this.gridListControl1.Items.Count; i++)
if (this.gridListControl1.GetSelected(i))
this.label2.Text += i + " ";
MessageBox.Show("Selected Items : " + count);

Refer the sample in below link:

Please let me know if you have nay queries.

Lingaraj S.


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

or the page will be automatically redirected to 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