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.
Unfortunately, activation email could not send to your email. Please try again.

change color of push button in GridControl

Thread ID:

Created:

Updated:

Platform:

Replies:

104354 Jul 12,2012 04:21 PM Jul 16,2012 12:29 AM WPF 3
loading
Tags: GridControl
Eugene Gutman
Asked On July 12, 2012 04:21 PM

Hi,

I am using Syncfusion v.9.2.0.137.

I would like to have possibilty to change color (or even brush) of push button control.

In Windows Forms application I was able to catch DrawCellButtonBackground event and paint button as I want. What could be done in WPF to do the same thing?

Thank you,

Andrei


Rajasekar [Syncfusion]
Replied On July 13, 2012 06:43 AM

 

Hi Andrei,

 

Thank you for your update. You can achieve this requirement by using the DataTemplate Celltype(Button in the DataTemplate). You can achieve your desired color in the CellValue2 of the GridStyleInfo and bind that respective property to the GridControl. Please check the below sample,

 

Sample: WpfApplication2.zip

 

Suppose if these doesn’t suits your requirement means, then please modify our sample and revert us with replication procedure.

 

Please let us know if you have any queries.

 

Thanks,

Rajasekar


Eugene Gutman
Replied On July 13, 2012 04:51 PM

Hi, Rajasekar!

It works as I need. Thank you very much.

Andrei


Rajasekar [Syncfusion]
Replied On July 16, 2012 12:29 AM

Hi Andrei,
 
Thank you for your reply.
 
Thanks,
Rajasekar

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.

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.

;