Articles in this section
Category / Section

How to customize the tab name of the ColorUIControl cell dropdown in WinForms GridControl?

Customize the colorui control


In order to have customized control in a grid cell, a custom cell model and cell renderer are needed. There are built-in model/renderers inside the source library. These models/renderers can be used as base classes for those customized model/renderer. Here, the customizing control is a dropdown control. So the custom classes can be derived from GridDropDownCellModel and GridDropDownCellRenderer built-in classes.

 

The ColorUIGroups tab name can be changed in the InitializeDropDownContainer method.

 

protected /*internal*/ override void InitializeDropDownContainer()
{
    base.InitializeDropDownContainer();
 
    colorUI = new ColorUIControl();
    colorUI.Dock = DockStyle.Fill;
    colorUI.Visible = true;
    colorUI.ColorSelected += new EventHandler(ColorUIColorSelected);
    this.colorUI.ColorGroups = ((Syncfusion.Windows.Forms.ColorUIGroups)((Syncfusion.Windows.Forms.ColorUIGroups.StandardColors)));

    //Color tab name has changed
    colorUI.StandardTabName = "TEST";
    this.DropDownContainer.Controls.Add(colorUI);
}
Protected Overrides Sub InitializeDropDownContainer() 'internal
    MyBase.InitializeDropDownContainer()
 
    colorUI = New ColorUIControl()
    colorUI.Dock = DockStyle.Fill
    colorUI.Visible = True
    AddHandler colorUI.ColorSelected, AddressOf ColorUIColorSelected
    Me.colorUI.ColorGroups = (CType((Syncfusion.Windows.Forms.ColorUIGroups.StandardColors), Syncfusion.Windows.Forms.ColorUIGroups))

    ‘Color tab name has changed
    colorUI.StandardTabName = "TEST"
    Me.DropDownContainer.Controls.Add(colorUI)
End Sub
 

The screenshots below displays the customized tab name for ColorUIControl in the Grid.

 

Customize the tab name of ColorUI control in GridControl

 

Customize the tab name of ColorUI control in GridControl

 

Samples:

C#: ColorEdit

VB: ColorEdit

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied