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.
Unfortunately, activation email could not send to your email. Please try again.

change the columntype

Thread ID:

Created:

Updated:

Platform:

Replies:

72574 Mar 27,2008 12:49 AM Feb 22,2018 11:53 PM Windows Forms 5
loading
Tags: GridControl
Reza
Asked On March 27, 2008 12:49 AM

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


Administrator [Syncfusion]
Replied On March 27, 2008 06:01 PM

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



Reza
Replied On March 28, 2008 02:43 AM

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





Administrator [Syncfusion]
Replied On March 28, 2008 10:31 PM

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



jas
Replied On February 22, 2018 01:10 PM

Thanks for such support 

Arulpriya Ramalingam [Syncfusion]
Replied On February 22, 2018 11:53 PM

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 


CONFIRMATION

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.

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.

;