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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom combobox cell with a button

Thread ID:

Created:

Updated:

Platform:

Replies:

61114 May 17,2007 10:37 PM UTC May 17,2007 11:28 PM UTC WinForms 2
loading
Tags: GridControl
Julie Levy
Asked On May 17, 2007 10:37 PM UTC

Hi -
I need to create a cell which contains a combobox plus a hideable button next to it. Do you have any samples demonstrating how to create this type of custom celltype (2 controls in one cell)?

I'm on version 4.4.0.51, .net 2.0
Thanks,
Julie

haneefm [Syncfusion]
Replied On May 17, 2007 11:05 PM UTC

Hi Julie,

You need to create a custom celltype. It 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. This sample in \Syncfusion\Essential Studio\4.1.0.10\windows\Grid.Windows\Samples\In Depth\DerivedCellControlTutorial can be referred.

After creating the custom celltype, it has to be registered through CellModels.Add

this.gridControl1.CellModels.Add("MyComboBox", new MyComboBoxCellModel(this.gridControl1.Model));

Then you may use
style.CellType = "MyComboBox";

Please refer to the attachment for implemention.
CustomComboBoxButtonCell.zip

Best regards,
Haneef

Julie Levy
Replied On May 17, 2007 11:28 PM UTC

Thanks Haneef -
i've added custom cell types before, i just didn't know how to add additional button control. Looks pretty easy.
Thanks for your help and the sample,
Julie

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.

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

;