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

$(....).data('ejDialog') does not work but $(..).ejDialog() does

Thread ID:

Created:

Updated:

Platform:

Replies:

125914 Sep 10,2016 04:24 PM UTC Sep 12,2016 01:01 PM UTC ASP.NET Web Forms 3
loading
Tags: Dialog
Kevin
Asked On September 10, 2016 04:24 PM UTC

having this strange issue with the dialog with asp.net. it was working fine with the <ej:Dialog ...><DialogContent></DialogContent></ej:Dialog>.
but now it does not work for some reason. trace the js, turns out that the call $(....).data('ejDialog') does not work but $(..).ejDialog() does.

.data('ejDialog') returns undefined. what went wrong? (we are using the minified ej.dialog.min.js generated from the syncfusion generation tool)

could it be the assemble license issue? it should not since .ejDialog() is working fine.

Kevin
Replied On September 10, 2016 06:23 PM UTC

turns out this setting breaks all the syncfusion controls


  <add key="webpages:Version" value="3.0.0.0" />

    <add key="webpages:Enabled" value="false" />

    <add key="ClientValidationEnabled" value="true" />

    <add key="UnobtrusiveJavaScriptEnabled" value="true" />


to fix this issue, one need to add this script reference

<script src="http://cdn.syncfusion.com/13.1.0.21/js/assets/scripts/common/ej.unobtrusive.min.js"></script>
but this script has reference to widget.

now if just using one control, say the dialog, we don't want to reference the entire 1.1M ej.widget.all.min.js

how to make it work for individual control then?


Kevin
Replied On September 10, 2016 06:42 PM UTC

<add key="UnobtrusiveJavaScriptEnabled" value="true" />  actually breaks the dialog control, its content no longer render properly. it's just showing a blank dialog. why is it such a a pain to use these controls?? (spending hours and hours hunting down this little hidden bugs :(

Selvamani Sankarappan [Syncfusion]
Replied On September 12, 2016 01:01 PM UTC

Hi Kevin, 
Thanks for Contacting Syncfusion Support, 
Query “now it does not work for some reason. trace the js, turns out that the call $(....).data('ejDialog') does not work but $(..).ejDialog() does. 
We can render the dialog control to using this $(..).ejDialog(). Then we get the object of the Dialog control using this $(....).data ('ejDialog') or $(....).ejDialog(“instance”). 
Query“<scriptsrc="http://cdn.syncfusion.com/13.1.0.21/js/assets/scripts/common/ej.unobtrusive.min.js"></script> but this script has reference to widget. “ 
This script file not control dependent. This is the common for all the components. 
Query “now if just using one control, say the dialog, we don't want to reference the entire 1.1M ej.widget.all.min.js 
Yes, No need to refer the ej.widget.all.min.js file for one control. We can download for the control dependency files alone using CSG. 
Please refer the following link: 
Query “<add key="UnobtrusiveJavaScriptEnabled" value="true" />  actually breaks the dialog control, its content no longer render properly. it's just showing a blank dialog. 
We have checked with your code example. And we are able to re-produce the reported issue in our end. In default, <add key="UnobtrusiveJavaScriptEnabled" value="true" /> using Unobtrusive mode enabled for ASP.NET MVC. 
Please check with the below link: 
For validating purpose only, if you are enabling the un- obtrusive mode in asp.net. Please check with the below link: 
Please let us know which platform you are currently using in your application. 
Regards, 
Selvamani 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

;