)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: WinForms |
Control: GridControl |
Published Date: November 14, 2015 |
Last Revised Date: December 18, 2019

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

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon