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.

Progarmically select a row in a static grid

Thread ID:





7876 Oct 13,2003 02:00 PM Oct 15,2003 10:56 AM Windows Forms 3
Tags: GridControl
Asked On October 13, 2003 02:00 PM

Hi, I have made a grid like a list by setting ListBoxSelectionMode = SelectionMode.One. If all cells are static type, how can I select a row programmically (mimic clicking on row header). In a case like this, clicking any static cell will still highlight the row, but CurrentCell's RowIndex is still -1. Thanks! James

Administrator [Syncfusion]
Replied On October 13, 2003 02:10 PM

You can call model.Selections.SelectRange(GridRangeInfo.Row(rowIndex), true); Stefan

Replied On October 15, 2003 08:42 AM

It does select the first row with some side effect. It set the foucs on first static column (the cell's color changed to white). How to get ride of that? Thanks!

Administrator [Syncfusion]
Replied On October 15, 2003 10:56 AM

Try handling the CurrentCellActivating event, and in your handler, set e.ColIndex = 0.


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.

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.