Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Custom Cell Painting and Auto Size
posted

Hello,

In my control, which inherits from UltraGrid, I implement IUIElementDrawFilter interface to do custom painting of the cells.

I also want to be able to override the preferred cell size to be used when user clicks to perforn auto-sizing of the column.

By default, the grid uses some kind of internal mechanism to determine the preferred cell size (maybe something like Graphics.MeasureString(Cell.Value.ToString()) / not exacly these methods, but you get my idea).

Please let me know if you know how to override the preferred cell size.

Cheers,
Andrey