Dynamically create a modalview

4 posts, 0 answers
  1. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 29 Jul 2014 Link to this post

    Hi
      Is this possible? I would like to create a modalview via an ajax call, possibly then destroy it and make another one?

    On that topic is this possible with normal views as well, I gather they aren't made until navigate is called but I haven't tried to replace them after they've been made

    thanks

  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 31 Jul 2014 Link to this post

    Hi Anthony,

    I am afraid that loading remote model views is not supported at the moment. I would suggest you to include the modal view with all the other views and just change its content whenever needed. 

    As for the standard views, you can use remote views in separate HTML files that will be loaded with an automatic AJAX call by the mobile application. Here is a demo of it:

    http://demos.telerik.com/kendo-ui/mobile-view/index

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 31 Jul 2014 in reply to Kiril Nikolov Link to this post

    I suspect it's the same answer but just to clarify

    What I would like to be able to do is something like this:

    <div id=container></div>

    I'd like to, via javascript, replace the above div with a modalView, presumably then calling some kind of initialization function on it and finally calling a function to make it appear.

    The same would also be useful for a view, and with a view it seems like it should be possible given that the remote view functionality must do something similar

    This would then give me more flexibility when returning partial views in MVC

    thanks

  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 01 Aug 2014 Link to this post

    Hi Anthony,

    Content injecting in a mobile application is not supported, so the approach that you would like to use is not recommended. I would once again suggest you to just change the content in the already inserted elements in the mobile application as it is the recommended way to go.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready