Completed
Last Updated: 02 Mar 2022 15:08 by ADMIN
Bindu
Created on: 24 Feb 2022 06:19
Category: UI for Blazor
Type: Feature Request
1
How to swap position of button from OK and Cancel to Cancel and OK in DialogFactory confirm dialog
Have a need to change the position of buttons in confirm dialog box of Dialog Factory. Any chance todo so?
1 comment
ADMIN
Hristian Stefanov
Posted on: 02 Mar 2022 15:08

Hi Bindu,

You can achieve the desired result easily with CSS style for flex-direction. I have prepared an example for you:

<style>
    .k-dialog-buttongroup {
        flex-direction: row-reverse;
    }
</style>

<TelerikButton OnClick="@ShowConfirm">Show Confirm with Custom Title</TelerikButton>

@code {
    [CascadingParameter]
    public DialogFactory Dialogs { get; set; }

    async Task ShowConfirm()
    {
        bool isConfirmed = await Dialogs.ConfirmAsync("Are you sure?", "Confirmation!");

        Console.WriteLine($"The user is sure: {isConfirmed}.");
    }
}

I'm also marking this public item here as "Completed" as the new Dialog component allows all kinds of customizations.

Regards,
Hristian Stefanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.