We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

filterbar with readonly textboxes

Hello, I have a derived class of GridFilterBar that replaces the comboxes with textboxes for GridDataboundGrid filtering (4.1.09 NET 2.0). Works fine! The only problem is that some of the filter cells should be read-only. This works also -- but I can''t switch back the columns to writable, once I have set them to readonly. I have found a way to change the text programmatically with Model.IgnoreReadOnly but user interaction is not possible anymore. Code: grid[rowIndex, colIndex].ReadOnly = true; // next line does not change ReadOnly grid[rowIndex, colIndex].ReadOnly = false; Suggestions?

3 Replies

ST stanleyj Syncfusion Team January 5, 2006 12:29 PM UTC

Hi Uwe, Try in Model.QueryCellInfo or PrepareViewStyleInfo handler. if(e.RowIndex == rowIndex && e.ColIndex == colIndex) e.Style.ReadOnly = true; Best regards, Stanley


UW Uwe Wittig January 5, 2006 04:58 PM UTC

Hi Stanley, worked like most code done in PrepareViewStyleInfo. It seems that all style manipulations should be done only in PrepareViewStyleInfo? Thanks, Uwe >Hi Uwe, > >Try in Model.QueryCellInfo or PrepareViewStyleInfo handler. > >if(e.RowIndex == rowIndex && e.ColIndex == colIndex) >e.Style.ReadOnly = true; > >Best regards, >Stanley


ST stanleyj Syncfusion Team January 5, 2006 05:16 PM UTC

Hi Uwe, Yes, that is the way because GDBG is a column oriented grid unlike GC(GridControl) that is cell oriented therefore setting styles through column are permitted in GDBG. There are also many articles in the knowledge base section. One related article would be http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=83. Best regards, Stanley

Loader.
Live Chat Icon For mobile
Up arrow icon