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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Opening dialog with dynamic content is throwing an error of "Cannot read property 'matrix' of undefined" (EJS)

Thread ID:

Created:

Updated:

Platform:

Replies:

146046 Jul 17,2019 05:11 PM UTC Jul 22,2019 09:58 AM UTC ASP.NET MVC - EJ 2 5
loading
Tags: Dialog
Daniel
Asked On July 17, 2019 05:11 PM UTC

Hi!

I'm working with dialog and dynamic content, but it is throwing an error of "Cannot read property 'matrix' of undefined" when the dialog is showed and affects, for example, my bootstrap menu that no longer open due to this error until I refresh the page. 






The general functionality of dialog is fine, only that this error causes errors in other places. Any idea how to fix this or the correct order to open/prepare the dialog with dynamic content?

Also, I have tested with static content and it does not generate that error. I think is something related to the dynamic content.

I attached the view that have this functionality.

Let me know if you need something extra.

Thanks!

Attachment: Index_3feac701.zip

Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On July 18, 2019 11:48 AM UTC

Hi Daniel, 
 
Good day to you. 
 
We have validated your issue with your use case scenario and we are able to reproduce it while updating dialog content in dynamic manner. For your reference we have prepared a sample to load the remote JSON data and the same can be downloaded from below link, 
 
 
Could you please check the above sample and get back to us with more details (like complete code snippet for Grid and Dialog) if you still face the issue in your end? 
 
Regards, 
Vinoth Kumar S 


Daniel
Replied On July 18, 2019 03:57 PM UTC

Hi Vinoth,

I tried the code that you attached and its works fine if we load a remote JSON data.

I added to this solution the thing that I want to do, and I was able to reproduce the issue that I have related to the bootstrap menu after opening and closing the Dialog with Grid inside. Curiously the error of "Cannot read property 'matrix' of undefined" does not appear, so it is not related to the bootstrap error.

  • You can run the project and reduce the screen until the options from menu are hidden:


  • Open and close the menu to verify it's working


  • Click the button that opens the dialog

  • You can interact with the Grid inside the Dialog without problem, after that... you can close the dialog.
  • Test from the main page to open and close again the menu --> You will detect that the menu cannot be closed (this is my issue in my current project)
Thanks, regards!

Attachment: EJ2MVC_IncludedMyFunctionality_564590c4.zip

Prince Oliver [Syncfusion]
Replied On July 19, 2019 11:11 AM UTC

Hi Daniel 

Thanks for your update. 

Issue-1: Bootstrap navigation menu is not working properly, once after closed the dialog.
 
 
We were able to reproduce your issue from the shared sample. The reported issue is due to duplication of Jquery and bootstrap scripts and relevant imports in both _LayoutNoMenu.cshtml and _Layout.cshtml pages. We suggest you to remove relevant scripts from _LayoutNoMenu.cshtml.

 
 

Issue-2: Script error throws, while loading content to dialog in dynamic manner. 
 
We have checked that the reported issue is due to the delay occurred while loading content to grid. Actually grid control tries to focus the grid cell before the content loading in it. To avoid this script error please remove tabIndex attribute in Created event of grid control.  

 

For your reference we have modified the shared sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/EJ2MVC1311329441  

Regards, 
Prince 


Daniel
Replied On July 19, 2019 02:11 PM UTC

Thanks for the solutions! Those work perfectly,

Regards.

Narayanasamy Panneer Selvam [Syncfusion]
Replied On July 22, 2019 09:58 AM UTC

Hi Daniel, 
 
Most welcome. we are glad that the issue is resolved in your end. 
 
Regards, 
Narayanasamy P. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon