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. Image for the cookie policy date
close icon

how to change apearence dropdownbutton when celltype is ColorEdit ?

Is it possible to change the apearence of the dropdownbutton when i change te celltype to ColorEdit? At the moment the button contains the character '@'. Can i change it to some other text, or a picture, or both?

1 Reply

AR Arulpriya Ramalingam Syncfusion Team January 15, 2020 08:38 AM UTC

Hi John, 
Greetings from Syncfusion. 
The Text in DropDown buttons can be customized by handling the TableControlDrawCellButton event. In that event the string can be rendered manually and the base action be restricted by enabling the Cancel property of GridTableControlDrawCellButtonEventArgs. Please make use of below code and sample. 
Example code 
//Event subscription 
gridGroupingControl1.TableControlDrawCellButton += GridGroupingControl1_TableControlDrawCellButton; 
//Event customization 
private void GridGroupingControl1_TableControlDrawCellButton(object sender, GridTableControlDrawCellButtonEventArgs e) 
    e.Inner.Graphics.DrawString("$", new Font("Segoe UI", 12f), new SolidBrush(Color.Green), e.Inner.Button.Bounds); 
    e.Inner.Cancel = true; 
Note: Image can be added in to the DropDown button by creating a custom cell model and cell renderer. Please make use of below KB link for further details. 
Please get back to us, if you have any other queries. 

Live Chat Icon For mobile
Up arrow icon