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

How to avoid Checkbox and DateTime Picker in GridGroupingControl when the Data is Readonly

Hi

We recently upgraded from 3.2.0 to 4.2 version of Sysnfusion GridGroupingControl. In the datasouce we have columns of type boolean and DateTime and my data is readonly. When we display the data in the new version(4.2), the GridGoupingControl is displaying a checkbox for boolean type column and DateTimePicker for DateTime type column. The earlier version of grid is not displyaing the checkbox and datatimepicker.

Please let us know how to avoid the Checkbox and Datetime picker controls in the GridGroupingControl and to display my data in raedonly mode in the new version of control.

Thaks for the help
Regards
Vijay

1 Reply

AD Administrator Syncfusion Team September 20, 2006 05:42 AM UTC

Hi Vijaya,

This is by Design. Use the below code snippet to change the celltype of the Boolean/DataTime type column in a grid.

//For Main Table
//TextBox for normal...//Static for readonly..
this.grid.TableDescriptor.Columns["BooleanColName"].Appearance.AnyRecordFieldCell.CellType = "TextBox"; //="Static"
this.grid.TableDescriptor.Columns["dateColName"].Appearance.AnyRecordFieldCell.CellType = "TextBox"; //="Static"

//For any table....
GridTableDescriptor gd = this.grid.GetTableDescriptor("MyTable"); //Code
gd.Columns["BooleanColName"].Appearance.AnyRecordFieldCell.CellType = "TextBox";//="Static"
gd.Columns["dateColName"].Appearance.AnyRecordFieldCell.CellType = "TextBox"; //="Static"

Thanks,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon