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
AD
Administrator
Syncfusion Team
September 26, 2003 11:31 AM
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 07: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.
AD
Administrator
Syncfusion Team
September 29, 2003 01: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
AD
Administrator
Syncfusion Team
September 30, 2003 11:28 AM
Thanks Stefan.
DT
DAVE TESSITORE
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
AD
Administrator
Syncfusion Team
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.