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. Image for the cookie policy date

Dialog

Hi.

Is there an example of how to open a dialog from client-side on Orubase 2.0?

Thank you.

1 Reply

AV Aravindan V Syncfusion Team November 12, 2013 06:23 AM UTC

Hi,
    Thanks for your interest on Syncfusion Product. You can achieve your requirement by following codes.

(1)    Render the Dialog by using the following block of code.
 

[ClientSideCode]

 

   <div id="dialog"

    data-role="sf-m-dialog"

    data-autoopen="false">

    <div>

            Are you sure you want to proceed?

    </div>    

    </div>

 

[MVC Code]

@{

              Html.Orubase().Dialog("dialog")

               .Title("Dialog")

               .Template(@<div>This is the Orubase Mobile Dialog control</div>)

               .IOS(ios => ios.LeftButtonText("Ok")

                                       .LeftButtonType(IOSButtonStyle.DialogOk)

                                       .RightButtonText("Cancel")

                                       .RightButtonType(IOSButtonStyle.DialogCancel)

                                       .DialogMode(MobDialogMode.Confirm)

                                       .ShowButton(true))

               .Render();

}

(2)    You can open the dialog control from client side by using following script code.

 

Script

           function OnTouchEnd(args)

           {

            $("#dialog").mDialog("show");  //Opens the dialog control from client side

            }

 

Regards,
Aravindan V


Loader.
Up arrow icon