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

change the columntype

Hi,
How can i change the GridGroupingControl columntype that bounded to a table , In DataGridView it's easy but i couldnot find anyway to change it in GridGroupingControl .

I have a custom columntype that convert dates to another calendar through another component, I should set the columntype to it but how in syncfusion?

King Regards


5 Replies

AD Administrator Syncfusion Team March 27, 2008 10:01 PM UTC

Hi Reza,

Thank you for your interest in Syncfusion products.

Please refer the code below to change the column type of the GridGroupingControl that is bounded to a table.

this.gridGroupingControl1.TableDescriptor.Columns["Col1"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.MonthCalendar;


Please let me know if this helps.

Regards,
Srirajan




RE Reza March 28, 2008 06:43 AM UTC

Hi Srirajan,
Thanks for your response , but my ColumnType is not in your list , it has another name , when i add specified Dll to my project It add a custom Column type to visual studio dgv and I can use it, but I don't know how to set that type to syncfusion grid columntypes,

Thanks

>Hi Reza,

Thank you for your interest in Syncfusion products.

Please refer the code below to change the column type of the GridGroupingControl that is bounded to a table.

this.gridGroupingControl1.TableDescriptor.Columns["Col1"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.MonthCalendar;


Please let me know if this helps.

Regards,
Srirajan






AD Administrator Syncfusion Team March 29, 2008 02:31 AM UTC

Hi Reza,

Thank you for posting query to us.

Custom celltype requires a ''model'' class and a ''renderer'' class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell, such as drawing it, handling mouse actions etc.

You can add a custom CellModel to a GridGroupingControl using "TableModel.CellModels.Add" method. Please refer the sample code below for more details.


this.gridGroupingControl1.TableModel.CellModels.Add("TwoTextBoxCell",new TwoTextBoxCellModel(this.gridGroupingControl1.TableModel));
this.gridGroupingControl1.TableDescriptor.Columns["Customers"].Appearance.AnyRecordFieldCell.CellType = "TwoTextBoxCell";


Please let me know if this helps.

Best Regards,
Srirajan




JA jas February 22, 2018 06:10 PM UTC

Thanks for such support 


AR Arulpriya Ramalingam Syncfusion Team February 23, 2018 04:53 AM UTC

Hi jas, 
 
Thanks for your appreciation. 

We are glad to hear that the provided solution was resolved your scenario.   
 
Please let us know, if you have any other queries. 
 
Regards, 
Arulpriya 


Loader.
Live Chat Icon For mobile
Up arrow icon