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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Image in GroupCaptionCell

Thread ID:





60337 May 2,2007 08:38 PM UTC May 2,2007 10:40 PM UTC WinForms 1
Tags: Grouping
Asked On May 2, 2007 08:38 PM UTC

Syncfusion 4.4
VS 2005

I want to add an image(like an alert icon) to the GroupCaptionCell if a record in that group meets a specific criteria and then also set the image for the group's parent group groupcaptioncell.

Can someone help with this? Thanks

haneefm [Syncfusion]
Replied On May 2, 2007 10:40 PM UTC

Hi Shek,

If you want to draw the Exclamation mark on GroupCaption cell, you need to handle the TableControlDrawCell event of the grid and draw image using the Graphics.DrawImage method. Here is a code snippet.

private void gridGroupingControl1_TableControlDrawCell(object sender, GridTableControlDrawCellEventArgs e)
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
if( style.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell )
Element el = style.TableCellIdentity.DisplayElement;
if( ! el.ParentGroup.IsMainGroup )
object category = el.ParentGroup.Category;
if( category != null)
e.Inner.Cancel = true;
Rectangle ImageRect= new Rectangle(e.Inner.Bounds.Location,new Size(20,e.Inner.Bounds.Height));
Rectangle TextRect= new Rectangle( new Point( e.Inner.Bounds.Location.X + 20,e.Inner.Bounds.Location.Y),
new Size(e.Inner.Bounds.Size.Width- 20,e.Inner.Bounds.Height));


Please refer to the attached sample for implementation.

Best regards,


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