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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Customizing Text positioning

Thread ID:





128313 Jan 13,2017 10:53 AM UTC Feb 1,2017 04:51 AM UTC Xamarin.Forms 4
Tags: SfDataGrid
Asked On January 13, 2017 10:53 AM UTC


I would like to align the text inside the datagrids to the left and not middle. How am I able to achieve this with the style property?



Replied On January 13, 2017 11:03 AM UTC

nvm wasn't looking right it was right in the mapping properties

Ashok N [Syncfusion]
Replied On January 16, 2017 12:33 PM UTC

Hi Luuk, 

Thanks for contacting Syncfusion support. 

We have checked your query and in our SfDataGrid we have used customized view. So, default implicit style was not work for customize view. You can achieve your requirement by setting GridColumn.TextAlignment as TextAlignment.Start. 


Joan Lopez
Replied On January 31, 2017 01:03 PM UTC


How can I align a switch column?

For example to display the switch button cetered.

I've tried with TextAlignment but it doesn't work.


Divakar Subramaniam [Syncfusion]
Replied On February 1, 2017 04:51 AM UTC

Hi Joan, 
We have checked your query. You can achieve your requirement by setting padding for GridSwitchColumn. Please refer the below code snippet. 
<sfGrid:SfDataGrid x:Name="dataGrid" AutoGenerateColumns="False"> 
        <sfGrid:GridTextColumn MappingName="OrderID" /> 
        <sfGrid:GridTextColumn MappingName="CustomerID" /> 
        <sfGrid:GridSwitchColumn MappingName="IsClosed" Padding="15,0,0,0" /> 
        <sfGrid:GridTextColumn MappingName="Freight" /> 
        <sfGrid:GridTextColumn MappingName="Country" /> 
Also, we have prepared a simple sample for your reference and you can dwonload the same from the below link. 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon