|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagrid readonly column problemPlease see the picture at http://mega.ist.utl.pt/~pfrg/datagrid/datagrid_problem.jpg The gost that I show it?s like a new readonly textbox. If the selected cell it?s not readonly there?s no problem. I think that the problem it?s ralated with lose of focus of the datagrid. After pressing a button, I fill again the datagrid with new datasource but this thing remains, hiding the new value! Only with scrool I can see that the new value it?s really there but the old is hiding it. I tried datagrid Refresh() and so many things but nothing works. Need help please. Thanks, -------------------------------- From: Paulo Gon?alves ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>DiTBOMhdu0KMGTS6J1GZMQ==</Id> Hi Paulo,
You can try the following. Create a DataGrid column style derived from DataGridTextBoxColumn. In the derived style, override the Edit method and do nothing in the overridden implementation. Use the new grid column style for the problematic column. Also, make sure you use the grid's SetDataBinding method to bind the grid to the new datasource. -- Show quoteHide quoteSincerely, Dmytro Lapshyn [Visual Developer - Visual C# MVP] "Paulo Gon?alves via .NET 247" <anonym***@dotnet247.com> wrote in message news:O0AeBpXOFHA.3716@TK2MSFTNGP14.phx.gbl... > My datagrid has a big problem, it happens only in columns that are read > only. > Please see the picture at > http://mega.ist.utl.pt/~pfrg/datagrid/datagrid_problem.jpg > The gost that I show it?s like a new readonly textbox. > If the selected cell it?s not readonly there?s no problem. > I think that the problem it?s ralated with lose of focus of the datagrid. > After pressing a button, I fill again the datagrid with new datasource but > this thing remains, hiding the new value! > Only with scrool I can see that the new value it?s really there but the > old is hiding it. > I tried datagrid Refresh() and so many things but nothing works. > Need help please. > > Thanks, > > > > > > -------------------------------- > From: Paulo Gon?alves > > ----------------------- > Posted by a user from .NET 247 (http://www.dotnet247.com/) > > <Id>DiTBOMhdu0KMGTS6J1GZMQ==</Id>
Other interesting topics
How to run aspnet with system account
COM Servers Communicating between forms... How do I change the radiobutton when listbox selection has changed If statement with multiple condition convert an improper fraction to a mixed number How to select treenode in treeview by name? HELP Problem serializing a structure Collections regex replace pipe character |
|||||||||||||||||||||||