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

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 10:15 AM

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 11:38 AM

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 03:27 AM

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 03:32 AM

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