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
395
How can we set control's alignment in a cell?
posted

 Hello there,

I inserted a radioButton in a cell and I wanna set its alignment as "center".

..

clm.EditorControl = this.ultraOptionSet1; // the radio button control

clm.CellAppearance.TextHAlign = HAlign.Center; // doesn't work...

...

Any  idea?

Cheers,

Elton

  • 37774
    posted

    I don't think this is possible through standard properties; since the UltraOptionSet doesn't expose any properties for centering the items, there is nothing that the grid can do.  The EditorControl is solely responsible for rendering a cell's area, though it will ask the column/cell to resolve appearances, but the TextHAlign property will not shift the actual position of the radio button.  The only way I can think of to do this would be to use a CreationFilter to manually size the option item.  If you want to go this route, the UIElementViewer might come in handy.

    -Matt