readonly DataGrid
-
Hi everyone, I have this read-only DataGrid (ReadOnly property set to true), but when the user selects a cell by clicking on it, the text of the cell is automatically selected, as if it could be edited. How can I do something more like a ListView, without this text selection? Thanks!
-
Hi everyone, I have this read-only DataGrid (ReadOnly property set to true), but when the user selects a cell by clicking on it, the text of the cell is automatically selected, as if it could be edited. How can I do something more like a ListView, without this text selection? Thanks!
-
You want read only datagrid or no selection on datagrid text? Because, you can also select text on read only datagrid.
-
Hi everyone, I have this read-only DataGrid (ReadOnly property set to true), but when the user selects a cell by clicking on it, the text of the cell is automatically selected, as if it could be edited. How can I do something more like a ListView, without this text selection? Thanks!
-
Change SelectionMode to FullRowSelect Now when the user selects a row, the entire thing is highlighted. They are unable to select the text of individual cells. Pualee
-
Looking briefly, I don't see a similar property on the DataGrid. Maybe someone else could help you there. However, you could try the following to get a similar effect: Override the SelectedIndexChanged event so that it sets the index on the row selected (overriding the cell selection) with the SelectedIndex property. As a disclaimer, I really don't know if this would unselect the cell. Pualee
-
Sorry, I must not have read closely. Is there any reason you are using the DataGrid instead of the DataGridView? I know there are a lot of enhancements made, but am unfamilar with anything pre 2.0 Framework at this time. Pualee
-
Well I have Visual Studio 2003 and I work with Framework 1.1. Is there an easy way of using Framework 2.0 without buying VS 2005? Thank you!
Did you try the method I put in the reply below using the event? I would suggest researching further using the DataGrid if you are in 2003, but if you are interested in framework 2.0 ... I think the download for the framework is free so you could always build everything programatically using a text editor. Since you likely won't want to do that you could try the Visual C# 2005 Express Edition which is free, but has a few limitations. Finally, you could try downloading the 2.0 framework and using it with the 2003 IDE, but I do not know what side effects you would see there. If you are using 1.1, I assume your clients are expected to have 1.1 installed as well. If you change to 2.0, you would also change your runtime requirements for your clients, which I am not sure you want to do. Also, I have no idea what the licensing requirements will be if you ever plan to deploy your application. Pualee