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

GridNumericColumn text vertically center align

I have a SfDataGrid with Text, Numeric, Combobox, Datetime and checkbox columns. Combobox and checkbox columns are centered aligned both vertically and horizontally. But for Text, Numeric columns TextAlignment="Center" works only horizontally. Is there anyway I can center align in both axes for textumeric columns in all modes(readonly\edit). Also a side note, Datetime column on edit, center aligns the text in both axes. I am attaching some screen shots for visual difference. 

Attachment: SFDataGrid_alignment_1a4d36a4.zip

1 Reply

MK Muthukumar Kalyanasundaram Syncfusion Team April 28, 2015 01:14 PM UTC

Hi Vasanth,

Thank you for usingSyncfusion products.

In readonly mode, the Text and Numeric column works horizontal only while setting TextAlignment as Center

We analyzed your query. If we set TextAlignment property as center, it will aligned the text horizontal only. So you can set theVerticalAlignmentproperty also forchanging the vertical alignment. Please refer the below code:



<!--Text column-->


<!--ComboBox Column-->


<!--Numeric Column-->


<!--DateTime Column-->

<syncfusion:GridDateTimeColumnMappingName="ShippedDate"VerticalAlignment="Center"TextAlignment="Center" />

<!--CheckBox Column-->



Please refer the attached sample.


In edit mode while setting TextAlignment as Center, the columns are not aligned as center

Weare able to reproduce the reported issueonour end. We have logged defect report regarding this query. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates,


Please let me know if you have any questions.


Muthukumar K

Live Chat Icon For mobile
Up arrow icon