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.
Unfortunately, activation email could not send to your email. Please try again.

GridNumericColumn text vertically center align

Thread ID:

Created:

Updated:

Platform:

Replies:

118950 Apr 27,2015 11:06 AM Apr 28,2015 09:14 AM WinRT 1
loading
Tags: SfDataGrid
Vasanth
Asked On April 27, 2015 11:06 AM

Hi,
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 text\numeric 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

Muthukumar Kalyanasundaram [Syncfusion]
Replied On April 28, 2015 09:14 AM

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:

Code:

<syncfusion:SfDataGrid.Columns>

<!--Text column-->

<syncfusion:GridTextColumnMappingName="ProductName"VerticalAlignment="Center"TextAlignment="Center"/>

<!--ComboBox Column-->

<syncfusion:GridComboBoxColumnItemsSource="{StaticResourceShipCountries}"VerticalAlignment="Center"TextAlignment="Center"MappingName="ShipCountry"/>

<!--Numeric Column-->

<syncfusion:GridNumericColumnMappingName="Freight"VerticalAlignment="Center"TextAlignment="Center"/>

<!--DateTime Column-->

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

<!--CheckBox Column-->

<syncfusion:GridCheckBoxColumnMappingName="IsClosed"VerticalAlignment="Center"TextAlignment="Center"/>

</syncfusion:SfDataGrid.Columns>

Please refer the attached sample.

Sample:http://www.syncfusion.com/downloads/support/forum/118950/WinRTGridColumns1788603616.zip

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,


https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents



Please let me know if you have any questions.

Regards,

Muthukumar K


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;