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

Select Row

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

6 Replies

AD Administrator Syncfusion Team September 26, 2003 04:31 PM UTC

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

SM Sajid Mohammed September 29, 2003 12:14 PM UTC

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.

AD Administrator Syncfusion Team September 29, 2003 06:15 PM UTC

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

AD Administrator Syncfusion Team September 30, 2003 04:28 PM UTC

Thanks Stefan.

DT DAVE TESSITORE December 11, 2003 02:36 AM UTC

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

AD Administrator Syncfusion Team December 11, 2003 08:52 AM UTC

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.

Live Chat Icon For mobile
Up arrow icon