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

Images and Text in the same column in Grouping Grid Control

Thread ID:





68645 Sep 26,2007 08:47 AM UTC Dec 26,2007 11:39 AM UTC WinForms 4
Tags: Grouping
Venkat Akella
Asked On September 26, 2007 08:47 AM UTC


I have to put image and text in the same column of the grid grouping control. Can you guys suggest any approach.

Golda Rebecal [Syncfusion]
Replied On October 2, 2007 02:16 AM UTC

Hi Venkat,

I regret for the long delay in responding.

You can achieve this requirement by handling the QueryCellStyleInfo to set the image index to the required cells of a particular column based on the cellvalue and TabeControlDrawCellDisplayText event to cancel the drawing of text in those cells.

Please refer to the attached sample that illustrates the same:

Kindly let me know if this helps you.

We appreciate your interest in Syncfusion products.

Best regards,

Venkat Akella
Replied On October 23, 2007 03:37 PM UTC

Actually i want to have image and Text in same column of the grid grouping control. Can you suggest how can i achieve this?

Venkat Akella
Replied On October 23, 2007 03:38 PM UTC

i want have image and text in same column cell of the Grid Grouping control. can you suggest an approach?

Jeba S [Syncfusion]
Replied On December 26, 2007 11:39 AM UTC

Hi Venkat,

Sorry for the delay in response.

Another way to achieve images and text in the same column in GroupingGridControl by handling the TableControlCellDrawn. In this event handler using the DrawImage method you can draw the image in the column that contains text.

Below is the code snippets:

private void gridGroupingControl1_TableControlCellDrawn(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDrawCellEventArgs e)
GridTableCellStyleInfo style = (GridTableCellStyleInfo)e.Inner.Style;
Rectangle iconBounds;
if (style.TableCellIdentity.ColIndex == 1 && style.TableCellIdentity.RowIndex >=4 )
iconBounds = Rectangle.FromLTRB(e.Inner.Bounds.Right - 18, e.Inner.Bounds.Top, e.Inner.Bounds.Right, e.Inner.Bounds.Bottom);
GridStaticCellRenderer.DrawImage(e.Inner.Graphics, this.images, 1, iconBounds, false);
e.Inner.Cancel = true;

Please refer the sample which illustrates the above said feature:

Kindly let us know if you need any further assistance.

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