Hi Julie,
If you want to display images in arbitrary pushbutton cell type, it probably will be simpler to handle the DrawCell event, and just draw the image there after the grid has finished doing its default drawing. Please try the
attached sample and let me know if this helps.
private void gridControl1_DrawCell(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellEventArgs e)
{
if (e.Style.CellType == "PushButton" && e.RowIndex > 0 )
{
//to cancel the default drawing in a grid
e.Cancel = true;
e.Style.Description = string.Empty;
e.Renderer.Draw(e.Graphics, e.Bounds, e.RowIndex, e.ColIndex, e.Style);
Rectangle crect = e.Bounds;
crect.Inflate(-5,-5);
e.Graphics.DrawImage(this.imageList1.Images[e.RowIndex % this.imageList1.Images.Count ], crect);
}
}
Best regards,
Haneef