![]() |
|
|||||||
| Winforms Grids Discussion related to grid controls of all types for Winforms |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Every time a form is loaded, I create a datagrid with two columns. The problem is that the first cell in the first column is automatically selected and blue. Setting the datagrid ReadOnly-property to False doesn't help. I found that setting the datagrid.Enabled=False helps, but then the scrollbars (which i need) won't work.
How can I make the whole datagrid sort of non-clickable and non-selectable, so that the user can't set focus to the cells, and also the first cell isn't selected when the form is loaded, but the datagrid is still scrollable? |
|
||||
|
I dont use DataGRid any more, but you can try the ReadOnly property, and also the properties to set the selection foreground and background colors
__________________
DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ |
|
|||
|
|
|
|||
|
Thanks for the tip but it doesn't work. Any other solutions?
![]() Quote:
|
|
|||
|
The pointer of the datagrid ALWAYS selects the row it points at.
So you may "unselect" the row as far as removing the highlight color, but the row remains selected. I don't see any way to truly unselect a row since there is always a pointer present. Maybe DataGrid is not your best choice for your task? |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|