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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid in ListBoxSelectionMode One

Thread ID:

Created:

Updated:

Platform:

Replies:

49322 Sep 15,2006 01:41 PM UTC Sep 18,2006 03:40 AM UTC Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 15, 2006 01:41 PM UTC

I am using a GridBoundDataGrid with ListBoxSelectionMode = ONE. I would like to know how I can both get and set which row is selected in the grid.

Thanks

Administrator [Syncfusion]
Replied On September 18, 2006 03:40 AM UTC

Hi Michael,

Use the Model.Selections property to manages selected ranges in the grid. It allows you to add and remove selections, determines selection state of a specific cell.

Issue 1: Set the selected rows..

this.grid1.Model.Selections.Add(GridRangeInfo.Row(RowIndex));

Issue 2: Get the selected rows..

//To find a selected rows in the grid
Console.WriteLine("Selected Ranges");
foreach( GridRangeInfo range in this.grid1.Model.Selections.Ranges)
{
Console.WriteLine(range.Info);
}

Thanks,
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

;