Open a PopOver from a function

4 posts, 2 answers
  1. Answer
    Alan
    Alan avatar
    7 posts
    Member since:
    Jan 2013

    Posted 20 Jun 2013 Link to this post

    Being new to JavaScript and Kendo I apologise if this is an improper use;

    I want to put up a model message; for example if a user deletes something I want to put up an 'Are You Sure' message over the top of the login view. This is a trivial exercise in .Net programming but, as I said, I am new to JavaScript and Kendo. 

    Looking through the Mobile Widgets the PopOver seems like a good way of doing of displaying a view over the top of another.
    The demonstration shows how to display a PopOver in response to a button click but I cannot find any way of displaying it from a function.
    • Is this possible?
    • Keeping in mind this is a mobile; is there a better way to display?

    Thanks for any pointers

    Alan

  2. Answer
    Alan
    Alan avatar
    7 posts
    Member since:
    Jan 2013

    Posted 20 Jun 2013 Link to this post

    I have found that the Model View widget does what I want.
    I can place 'Please Confirm...' in the header and two buttons in the body giving myself a nice little message box style dialog.
    With a little work I can refactor my first attempt into something more generic for other 'Yes' 'No' scenarios.
    I will mark this as answered as it covers my scenario; but as I said I am a newbie with Kendo so if there is a better way please let me know.

    I would also still like to know if we can raise a PopOver from a function.

    Alan
  3. Kendo UI is VS 2017 Ready
  4. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 21 Jun 2013 Link to this post

    Hello Alan,

    First of all let me welcome you to the Kendo UI community!

    I think that ModalView is a good approach for the login functionality you are looking for.
    As a general information you can open the PopOver from a function using the built in open() method.

    function openPopOver() {
         $("#foo").data("kendoMobilePopOver").open();
     }

    More information regarding the PopOver widget can be found here:

    http://docs.kendoui.com/api/mobile/popover

    Regards,
    Kiril
    T
    elerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Alan
    Alan avatar
    7 posts
    Member since:
    Jan 2013

    Posted 21 Jun 2013 Link to this post

    Many thanks

    Alan
Back to Top
Kendo UI is VS 2017 Ready