>Hi Mario,
You can do this by handling the TableControlDrawCell event of the grid and draw image by using the Graphics.DrawXXX method. Below is a code snippet
void gridGroupingControl1_TableControlDrawCell(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDrawCellEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
Element el = style.TableCellIdentity.DisplayElement;
if (el.Kind == DisplayElementKind.Record && style.TableCellIdentity.Column != null
&& style.TableCellIdentity.Column.Name == "Col 1")
{
if (style.CellValue != null || style.CellValue.ToString() != string.Empty)
{
e.Inner.Cancel = true;
e.Inner.Graphics.DrawIcon(SystemIcons.Question, e.Inner.Bounds);
}
}
}
Best regards,
Haneef
Hi Haneef,
i tried your snippet, but i got the same thing where i myself stuck :), the event fill all cells no matter if there's a value, and the icon is large, it spreads through the entire cell...
Example in the attachement...
CellIcon0.zip