Hi George,
Thanks for your update.
We can understand your scenario. This event will get triggered for each cell before a GridTableControl starts painting and allows to customize the display of cells. This event only triggered recursively for the cells that are being displayed on screen (only on demand)
When mouse over or resize of form causes some cells to be drawn or redrawn which causes triggering of this event. So with proper conditional statements in the event, the unnecessary execution of the code can be avoided.
Please refer the below link,
In order to overcome this scenario, You can use the Byte[] DateType for image column and convert the image as byte[] format in DataTable. Please refer the below code example and refer the below attached sample,
Code snippet
for (int l = 0; l < 5; l++)
{
DataRow dr = dt.NewRow();
dr[0] = name1[r.Next(0, 5)];
dr[1] = "E" + r.Next(30);
dr[2] = new DateTime(2012, 5, 23);
dr[3] = country[r.Next(0, 5)];
dr[4] = city[r.Next(0, 5)];
dr[5] = scountry[r.Next(0, 5)];
dr[6] = r.Next(1000, 2000);
dr[7] = r.Next(10 + (r.Next(600000, 600100)));
Byte[] imageArray = System.IO.File.ReadAllBytes(FindFile(@"flower" + l % 3 + ".jpg"));
dr[8] = imageArray;
dt.Rows.Add(dr);
}
return dt;
Screen shot
Regards,
Mohanraj G