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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

filterbar with readonly textboxes

Thread ID:





39369 Jan 5,2006 11:57 AM UTC Jan 5,2006 05:16 PM UTC WinForms 3
Tags: GridControl
Uwe Wittig
Asked On January 5, 2006 11:57 AM UTC

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?

stanleyj [Syncfusion]
Replied On 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

Uwe Wittig
Replied On 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

stanleyj [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon