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

hide DatePicker for readonly columns

Hi, I have a bound datagrid with dynamic column selection. This grid should be read only. Although I can get it to be readonly, all the date type columns still show a datepicker. How can I make ALL the columns in my grid type TextBox irrespective of the bound column type? thanks

3 Replies

AD Administrator Syncfusion Team March 8, 2005 06:18 PM

There is a static member of the GridModelDataBinder.AutoInitCellTypes that you can set to control this functionality. So, at the top of your form’s constructor, before the call to InitializeComponent(), , you can add: GridModelDataBinder.AutoInitCellTypes = False


FH Faraz Haque March 8, 2005 06:52 PM

Thanks, that helps. I guess i would need to reset AutoInitCellTypes to true once I am done rendering as other forms may be affected by this static property >There is a static member of the GridModelDataBinder.AutoInitCellTypes that you can set to control this functionality. So, at the top of your form’s constructor, before the call to InitializeComponent(), , you can add: > >GridModelDataBinder.AutoInitCellTypes = False > >


AD Administrator Syncfusion Team March 8, 2005 07:19 PM

Alternatively, you can explicitly set the style.CellType on these columns to "Static". This would avoid having to change the static property.

Loader.
Live Chat Icon For mobile
Up arrow icon