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.

PushButton Cell Type in GridGrouping Control

Thread ID:

Created:

Updated:

Platform:

Replies:

76989 Oct 3,2008 02:46 PM Oct 7,2008 08:27 AM Windows Forms 1
loading
Tags: Grouping
Ankit Thakkar
Asked On October 3, 2008 02:46 PM

Hi,

I have made one of my column's cellType as PushButton in my Grid Grouping Control.

Now, I have a requirement to change the Color of my push Button programatically for each row.

Kindly, let me know how to achieve this..

Thanks,




Jisha Joy [Syncfusion]
Replied On October 7, 2008 08:27 AM


Hi Ankit,


Thank you for your interest in Syncfusion Products.

This can be achieved by handling the TableControlDrawCellButtonBackground event. please refer the code:

void gridGroupingControl1_TableControlDrawCellButtonBackground(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDrawCellButtonBackgroundEventArgs e)
{
if (e.Inner.Style.CellType == "PushButton")
{
e.Inner.Graphics.FillRectangle(Brushes.LightGray, e.Inner.Bounds);
e.Inner.Cancel = true;

}

}

Kindly try this and let me know if this helps.
Regards,
Jisha


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.

;