I am setting the my UltraControlContainerEditor "derived" control for a column. When a property on my derived control is changed, I want the column to be redrawn. How can I trigger this?
Yes, you are correct, it invalidates the whole grid. You could pass a Rectangle into the Invalidate method to invalidate only the area containing the column - but determining this Rectangle could be a bit tricky.
I assumed that the property you are setting on your control is probably not getting set a lot. I'm guessing that it happens in response to some user action, like when the user clicks on a button, so in that case, it's not going to happen often and it only happens once, so performance in that case should not be an issue.
If you are changing the property 1000 times in a loop, that might be a problem, but even then it's probably okay, since Invalidate doesn't actually cause the grid to paint - it just tell Windows to paint the grid the next time a paint message happens.
Thanks this works. I am guessing this would cause the complete grid to redraw. Will this be big on performance.
Hi,
Try:
grid.Invalidate();