In the DrawCell event I am drawing a small image in one of the cells.
private void gridAssignments_DrawCell(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellEventArgs e) {
e.Graphics.DrawImage(ledImage, (int) (e.Bounds.X + (e.Bounds.Width - ledImage.Width)/2), ((int) e.Bounds.Y + (e.Bounds.Height - ledImage.Height) / 2));
}
The grid is set to be a listbox styled grid. Now this all works fine if i use the arrow keys to move up and down. The gray highlighted row shows the image in it. However if I click a row then the image appears on mousedown (highlighted in grey) but on mouseup it then disappears, presumably being overwritten by the gray bar.
It seems odd that it works with keys but not clicks.
How can I fix this?
thanks,
simon
AD
Administrator
Syncfusion Team
April 20, 2004 05:04 PM UTC
Instead of using the DrawCell event, try using the CellDrawn event instead.
AD
Administrator
Syncfusion Team
April 21, 2004 04:42 AM UTC
that did it :)
thanks