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

Vertical alignment of cells on edit mode

I am able to vertically center cells using : styleInfo.VerticalAlignment = GridVerticalAlignment.Middle; However, as soon as the cell goes into edit mode, vertical alignment reverts to top aligned, which looks a bit stange as the cells are quite tall, so the text jumps up to a different location. Is there a way to enforce vertical cell centering even when in edit mode? Alex.

2 Replies

AD Administrator Syncfusion Team February 14, 2005 10:27 AM UTC

There are no property setting to do this for you automatically. You can try setting the style.TextMargins.Top property for the cell to some appropriate value. This should move the top of the TextBox away from the top border.


AD Alex Drizen February 14, 2005 04:14 PM UTC

Not an ideal workaround - but works fine for my needs. Thanks for the quick response! Alex. >There are no property setting to do this for you automatically. > >You can try setting the style.TextMargins.Top property for the cell to some appropriate value. This should move the top of the TextBox away from the top border.

Loader.
Live Chat Icon For mobile
Up arrow icon