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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Progarmically select a row in a static grid

Thread ID:





7876 Oct 13,2003 06:00 PM UTC Oct 15,2003 02:56 PM UTC WinForms 3
Tags: GridControl
Asked On October 13, 2003 06:00 PM UTC

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 06:10 PM UTC

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

Replied On October 15, 2003 12:42 PM UTC

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 02:56 PM UTC

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.

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

Live Chat Icon For mobile
Live Chat Icon