We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

CellDrawn

I''m drawing some text in the header of my GridControl How can i trigger a redrawing of cell manually I can''t figure out how to use cellDrawn event Thanks Silver

4 Replies

MC Martin Cyr July 7, 2005 03:15 PM UTC

I don''t understand your problem, do you really want to trigger a redraw in the cellDrawn? Be carefull about infinite recursive calls then. But you might wanna try CurrentCell.Refresh()


AD Administrator Syncfusion Team July 7, 2005 04:38 PM UTC

Are you using e.Graphics.DrawString in your CellDrawn event handler to draw the text you want to see when e.ColIndex points to the column where the text should be, and e.RowIndex i s zero?


AD Administrator Syncfusion Team July 8, 2005 08:27 AM UTC

Yes Clay this is exactly what i do. I draw on the suface since i handle manually many other drawing items on the header cell. Silver


AD Administrator Syncfusion Team July 8, 2005 08:32 AM UTC

If you want to trigger the redrawing of a cell, the you can call grid.RefreshRange passing it a GridRangeInfo object containing the cell. But as Martin noted, if you try to do this from one of the drawing events, you have to use a flag avoid recursive calls. But calling grid.RefreshRange from outside the drawing code should trigger the drawing.

Loader.
Live Chat Icon For mobile
Up arrow icon