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.

Full row selection changes GroupCaptionPlusMinusCell backcolor

Thread ID:





91022 Oct 29,2009 08:40 PM Nov 4,2009 03:28 AM Windows Forms 5
Tags: GridControl
Greg Kim
Asked On October 29, 2009 08:40 PM

When clicking on a caption row that contains a GroupCaptionPlusMinusCell (whose cell type is Image) in the GridGroupingControl, the whole row changes to the specified color set in the code for a split second. Then the GroupCaptionPlusMinusCell in that row switches to a lighter color. How can the GroupCaptionPlusMinusCell's backcolor be made to be consistent with the rest of the row?

I have included a sample project to illustrate what I am talking about.

Thanks in advance for your help.


Jisha Joy [Syncfusion]
Replied On October 30, 2009 06:26 AM

Hi Greg,

You could try by setting the ImageSizeMode to GridImageSizeMode.StretchImage and let me know if this helps.

gridGroupingControl1.Appearance.GroupCaptionPlusMinusCell.CellType = "Image";
gridGroupingControl1.Appearance.GroupCaptionPlusMinusCell.ImageSizeMode = GridImageSizeMode.StretchImage;

Thank you for your interest in Syncfusion products.


Greg Kim
Replied On October 30, 2009 11:55 AM

Hi Jisha,

That didn't work. Any other ideas?


Rajadurai C [Syncfusion]
Replied On November 2, 2009 04:17 AM

Hi Greg,

Thanks for your update.

Please refer to the attached modified sample in which the following code is handled in QueryCellStyleInfo event along with some properties settings in constructor method.

if (e.TableCellIdentity.DisplayElement != null)
if (e.TableCellIdentity.Table.CurrentElement == e.TableCellIdentity.DisplayElement)
e.Style.BackColor = Color.LightGray;

gridGroupingControl1.TableOptions.SelectionBackColor = Color.LightGray;
gridGroupingControl1.TableOptions.SelectionTextColor = SystemColors.ControlText;

This setting gives GroupCaptionPlusMinusCell the similar look as GroupCaptionCell, when it was clicked.



Greg Kim
Replied On November 3, 2009 06:32 PM

Hi Rajadurai,

That works as long as the ListBoxSelectionMode is set to SelectionMode.None. If it is set to SelectionMode.One, then the same behavior occurs. I should have clarified before that I need to do a full row select on other rows as well and not just the one containing the plus/minus cell.

Jisha Joy [Syncfusion]
Replied On November 4, 2009 03:28 AM

Hi Greg,

Please refer the modified sample that get this done.

Please let me know if you have any questions.




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.