GridToolBarTemplate how to align a button to the right and a button to the left

1 Answer 145 Views
Grid
Lee
Top achievements
Rank 1
Iron
Lee asked on 06 Aug 2024, 05:49 PM | edited on 06 Aug 2024, 05:51 PM

I have the following code for my GridToolBarTemplate. We want the ExportToExcel formated to the far right while the Resub, Cancel and Cleare stay to the left.  How is this done?


                <GridToolBarTemplate>
                    <GridCommandButton Command="Resubmit" Enabled="@IsResubmitEnabled" Icon="@SvgIcon.Redo" OnClick="TransactionsGrid_ResubmitButton_ClickAsync">RESUBMIT</GridCommandButton>
                    <GridCommandButton Command="Cancel" Icon="@SvgIcon.Cancel" OnClick="TransactionsGrid_CancelButton_Click">CANCEL</GridCommandButton>
                    <GridCommandButton Command="Clear" Icon="@SvgIcon.ArrowRotateCcw" OnClick="TransactionsGrid_ClearButton_Click">CLEAR</GridCommandButton>
                    <GridCommandButton Command="ExcelExport" Icon="@SvgIcon.FileExcel">Export to Excel</GridCommandButton>
                    
                </GridToolBarTemplate>

1 Answer, 1 is accepted

Sort by
0
Lee
Top achievements
Rank 1
Iron
answered on 06 Aug 2024, 07:56 PM
<div style="margin-left:auto">
    <GridCommandButton Command="ExcelExport" Icon="@SvgIcon.FileExcel">Export to Excel</GridCommandButton>
    <label class="k-checkbox-label"><TelerikCheckBox @bind-Value="@ExportAllPages" />Export All Pages</label>
</div>
Hristian Stefanov
Telerik team
commented on 07 Aug 2024, 01:23 PM

Hi Lee,

It seems that you have resolved the matter on your own. I'm glad to hear this.

Sharing an update here is appreciated, as other developers with the same scenario can benefit from it.

Kind Regards,

Hristian

Tags
Grid
Asked by
Lee
Top achievements
Rank 1
Iron
Answers by
Lee
Top achievements
Rank 1
Iron
Share this question
or