Articles in this section
Category / Section

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

1 min read

Customize the colorui control

In order to have a 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 model/renderer 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.

 

ColorUIGroups tab name can be changed in the InitializeDropDownContainer method.

C#

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);
}

 

VB

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

 

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)
Please  to leave a comment
Access denied
Access denied