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.

How to have a combination of ComboBox and ButtonEdit cell within a single Grid cell?

 The combo box cell and button edit cell can be implemented by having a ComboCellModel and the ComboCellRenderer that is derived from GridComboCellModel and GridComboCellRenderer.

The below link helps to guide the custom cell renderer: Custom cell renderer .

The above link helps to learn about custom cell renderer and also we can learn how the cell models and cell renderer will be works.

Creating Cell Model

In the combo cell model, the combo cell renderer class object is invoked by a CreateRenderer() override method.

 

 

Creating Cell Renderer

In the combo cell renderer, the customization of the cell is achieved. The combo box button is added to ComboCellRenderer.

 

 

Adding Cell Models

The created model (ComboCellModel) can be added into CellModels collection and the cell type name ComboBoxButtonEditCell can be defined.

 

 

Assigning Cell type

The cell type ComboBoxButtonEditCell can be assigned to a cell or range of cells using the CellType property.

 

 

Event for the Cell Button

To trigger an event when cell button clicked, the renderer.button.Clicked event can be used. This event is coded in the cell renderer level. Likewise, any events can be added in ComboBoxButtonEditCell.

 

 

 

Screenshot

Sample link

C#:ComboBox with Button

VB:ComboBox with Button

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
6679 04/18/2016 04/21/2016 Windows Forms GridControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.