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.
Syncfusion Feedback

Customizing Text positioning

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hey,

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?


Cheers,

Luuk

Luuk
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. 

Regards, 
Ashok 


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

Hi,

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.

Thanks,
Joan

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:SfDataGrid.Columns> 
        <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" /> 
    </sfGrid:SfDataGrid.Columns> 
</sfGrid:SfDataGrid> 
 
 
Also, we have prepared a simple sample for your reference and you can dwonload the same from the below link. 
 
 
 
Regards, 
Divakar. 
 


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.

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

;