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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Gridlist Control C#

Thread ID:

Created:

Updated:

Platform:

Replies:

84519 Jul 1,2009 06:36 AM UTC Jul 10,2009 11:53 AM UTC WinForms 1
loading
Tags: GridControl
brandon
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))
{
count++;
this.label2.Text += i + " ";
}
}
MessageBox.Show("Selected Items : " + count);


Refer the sample in below link:
http://files.syncfusion.com/support/samples/Grid.Windows/Forums/GridList1.zip

Please let me know if you have nay queries.

Regards,
Lingaraj S.

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

;