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 change apearence dropdownbutton when celltype is ColorEdit ?

Thread ID:

Created:

Updated:

Platform:

Replies:

150641 Jan 14,2020 12:01 PM UTC Jan 15,2020 08:38 AM UTC WinForms 1
loading
Tags: GridControl
John van der Putte
Asked On January 14, 2020 12:01 PM UTC

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?

Arulpriya Ramalingam [Syncfusion]
Replied On 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. 
 
Regards, 
Arulpriya 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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