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

Any example about Dialog Modal???

Thread ID:

Created:

Updated:

Platform:

Replies:

116096 Apr 1,2014 04:48 PM UTC Apr 3,2014 11:53 AM UTC ASP.NET MVC (Classic) 1
loading
Tags: Dialog
Jesus Sanchez
Asked On April 1, 2014 04:48 PM UTC

I would like to create an application that when you click in a button open one modal dialog a previously created view. The dialog modal will contain a form to create/edit records in a database. I can do a basic example on what you get. No bd, just with a simple list like that they build in the grid is not required...
Thank you

Ezhil S [Syncfusion]
Replied On April 3, 2014 11:53 AM UTC

Hi Jesus Sanchez,

 

Thank you for using Syncfusion products.

 

To create a modal dialog with a partial view on button click event, we suggest you to create a partial view with the required data. Now create a <div> for dialog and add the partial view into the div element using @Html.Partial(). Now create dialog using Syncfusion.Dialog() and set Modal(true), please refer the following code snippet,

 

<code>

[View]

<div id="dialogContents" title="Syncfusion Dialog" style="visibility: hidden">

@Html.Partial("ViewUserControl1"

</div>

<input type="button" value="Modal dialog" onclick=" dialogopen()" />

@Html.Syncfusion().Dialog("dialogContents").Width(300).Height(400).AutoOpen(false).Modal(true)

 

[Script]

<script type="text/javascript">

    function dialogopen() {

        $("#dialogContents").dialog("open");

    }

</script>

</code>

 

We have prepared a simple sample to load partial view into modal dialog, which can be downloaded from the following link:

Modaldialog_f116096.zip

 

Kindly let us know if you require further assistance on this.


Regards,

Ezhil S


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

;