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

How to show images in Grid Groupinng Control cells.

Thread ID:





69456 Oct 29,2007 09:38 AM UTC Oct 29,2007 02:38 PM UTC WinForms 2
Tags: GridControl
Iliya Nesterov
Asked On October 29, 2007 09:38 AM UTC

How to load image into a cell? How to load image list and show indexed images in a cell?
Is it possible to load images in nested tables?

haneefm [Syncfusion]
Replied On October 29, 2007 01:57 PM UTC

Hi Iliya,

How to load image into a cell?
To load the image to particular column then you need to set the CellType,ImageList and ImageIndex property of the column's appearance object. Below are the codes:

this.gridGroupingControl1.TableDescriptor.Columns["Image"].Appearance.AnyRecordFieldCell.CellType = "Image";
this.gridGroupingControl1.TableDescriptor.Columns["Image"].Appearance.AnyRecordFieldCell.ImageList = list;
this.gridGroupingControl1.TableDescriptor.Columns["Image"].Appearance.AnyRecordFieldCell.ImageIndex = 1;

For NestedTables:
GridTableDescriptor td1 = gridGroupingControl1.GetTableDescriptor("TableName");
td1.Columns["Image"].Appearance.AnyRecordFieldCell.CellType = "Image";
td1.Columns["Image"].Appearance.AnyRecordFieldCell.ImageList = list;
td1.Columns["Image"].Appearance.AnyRecordFieldCell.ImageIndex = 1;

If you want to load the image to particular gridcell then you need to handle the QueryCellStyleInfo event to set the CellType,ImageList and ImageIndex property of the Style object . Below are the codes:

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
if (e.TableCellIdentity.Column != null && e.TableCellIdentity.Column.Name == "Image")
e.Style.ImageIndex = e.TableCellIdentity.RowIndex % 4;
e.Style.ImageList = list;
e.Style.CellType = "Image";

Best regards,

Iliya Nesterov
Replied On October 29, 2007 02:38 PM UTC

Thank you!


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