Hi Arif ,
Thank you for posting query to us.
One way you can do this by handling the TableControlDrawCell event of the gridGroupingControl and draw default pushbutton by using Renderer.Draw method. In the event handler, you can use e.Graphics.DrawImage to draw the bitmap and then set e.Inner.Cancel = true to handle it. Below is the code snippets:
this.gridGroupingControl1.TableControlDrawCell += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDrawCellEventHandler(gridGroupingControl1_TableControlDrawCell);
void gridGroupingControl1_TableControlDrawCell(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlDrawCellEventArgs e)
{
if (e.Inner.Style.CellType == "PushButton")
{
e.Inner.Cancel = true;
// //Draw the Image in a cell.
string sButtonText = e.Inner.Style.Description;
e.Inner.Style.Description = string.Empty;
e.Inner.Renderer.Draw(e.Inner.Graphics, e.Inner.Bounds, e.Inner.RowIndex, e.Inner.ColIndex, e.Inner.Style);
Rectangle irect = new Rectangle(new Point(e.Inner.Bounds.X + 3, e.Inner.Bounds.Y + 3), new Size(e.Inner.Bounds.Size.Width - 6, e.Inner.Bounds.Size.Height - 6));
e.Inner.Graphics.DrawImage(this.imageList1.Images[e.Inner.RowIndex % this.imageList1.Images.Count], irect);
}
}
Please refer the sample in the link which illustrate normal buttons having an image:
http://websamples.syncfusion.com/samples/Grid.Windows/F70656_A/main.htmKindly try this and let me know if you need further assistance.
Best Regards,
Srirajan