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.

Select Row

Thread ID:





7491 Sep 26,2003 11:43 AM Dec 11,2003 03:52 AM Windows Forms 6
Tags: GridControl
Administrator [Syncfusion]
Asked On September 26, 2003 11:43 AM

This should be an easy question, but for some reason I can't get Grid to do this. I want the entire row to be selected (highlighted) whenever a cell is selected. How can I do this? Thanks, Greg

Administrator [Syncfusion]
Replied On September 26, 2003 12:31 PM

There are two solutions: a) ListBox mode Set grid.ListBoxSelectionMode = SelectionMode.One, and also handle the grid.CurrentCellActivating event and just set e.ColIndex = 0 in your handler. b) Check out also the sample D:\Syncfusion\Essential Suite\Grid\Samples\Quick Start\HighlightCurrentRow (using PrepareViewStyleInfo) Stefan

Sajid Mohammed
Replied On September 29, 2003 08:14 AM

Stephen, i am using ListBoxSelectionMode to get the row select behavior into my GridControl. is it possible to get the row selection done with a different color? the default row select color is too dim and the row doesnt really appear selected.

Administrator [Syncfusion]
Replied On September 29, 2003 02:15 PM

The GridModelOptions.AlphaBlendSelectionColor property specifies the System.Drawing.Color for alpha blended cell selections. There you could change the color used for selections. Stefan

Administrator [Syncfusion]
Replied On September 30, 2003 12:28 PM

Thanks Stefan.

Replied On December 10, 2003 09:36 PM

Hi Guys... In a Virtual Grid, I put the code in to select the entire row and it works fine..but how do I programattically set the highlighted row to any visible row? how do I know what the top row is and the bottom row is and move the hightlight bar within the visible rows? Thanks. Dave

Administrator [Syncfusion]
Replied On December 11, 2003 03:52 AM

Top visible row is this.grid.TopRowIndex. Bottom visible row is this.grid.ViewLayout.LastVisibleRow. To move the the current cell (hence the current row), you call this.grid.CurrentCell.MovetTo.


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.