I would like to use a simple Databound grid with one tweak. FWIW, the grid will be read only (no user updates of grid data) and will use a DataTable as the DataSource.
The tweak is that I would like the row headers to behave like column headers. Specifically, I want to:
a) eliminate the current row indicator (the arrow head)
b) place text in the row header cells, ideally by using column 0 of my DataTable
c) preserve the ability to use row header cells to select an entire row (via the usual windows methods, click, ctrl-click, click and drag, etc.)
I''ve tried to do this by hiding column 0 of the grid and assigning the column header style to column 1. This handles the text requirement but the row selection is missing. And in order to fix that I have to resort to handling mouse down and mouse move events. I am hopeful there is an easier way to get the results I want.
Thank you for any help.
PS - I posted this originally to the ASP version of the forum (had the lonk bookmarked) but saw no replies so I re-posted here. Soory if this causes duplication.
ADAdministrator Syncfusion Team August 23, 2004 04:26 PM
Try hiding column 1 (grid.Model.Cols.Hidden = true;) so it does not show up in the grid. Then handle the PrepareViewStyleInfo vent and set the e.Style for column zero. This should allow the selection behavior to work.