GridCommandColumns column on left with left aligned content

Wanted to add a column containing GridCommandColumns as first column on the left but the content is right aligned. 

is there any way to left align the command buttons


5 Replies

RS Renjith Singh Rajendran Syncfusion Team May 9, 2022 05:46 AM UTC

Hi Michael,


Greetings from Syncfusion support.


You can set the TextAlign property of GridColumn to align the contents of the column based on your requirement. Please refer the code below,


 

        <GridColumn HeaderText="Manage Records" TextAlign="TextAlign.Left" Width="200">

            <GridCommandColumns>

                <GridCommandColumn Type="CommandButtonType.Edit" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-edit", CssClass = "e-flat" })"></GridCommandColumn>

                 ...

            </GridCommandColumns>

         </GridColumn>

 


Please get back to us if you need further assistance.


Regards,

Renjith R



MS Michael Salzlechner May 9, 2022 09:56 AM UTC

should have mentioned i did try setting TextAlign to TextAlign.left

but the TD segment still has a style text-align:right 

works for a regular column but not a command column





RS Renjith Singh Rajendran Syncfusion Team May 10, 2022 05:11 AM UTC

Hi Michael,


We are attaching a sample in which the command column is aligned properly to left when added the TextAlign property. Please download and refer the attached sample and check this from your side.


Please refer the screenshot below,



Kindly refer the attached sample and check this from your side. If you are still facing difficulties, then kindly share with us a simple issue reproducing sample for us to proceed further.


Regards,

Renjith R


Attachment: ServerApp_a9ead52.zip


MS Michael Salzlechner May 10, 2022 01:27 PM UTC

tested it and it seems to be an issue that was fixed in a newer version of SF. Looks like we may need to upgrade to a newer version



RS Renjith Singh Rajendran Syncfusion Team May 11, 2022 05:10 AM UTC

Hi Michael,


Thanks for your update. Please get back to us if you need further assistance.


Regards,

Renjith R


Loader.
Up arrow icon