How to open an ActionSheet control in javascript

7 posts, 1 answers
  1. Grant
    Grant avatar
    1 posts
    Member since:
    Jun 2011

    Posted 19 Jun 2012 Link to this post

    Hi guys,

    Been working with the new Action Sheet control and it's been really great! Just struggling with one thing at the moment.

    I'm trying to open a Kendo ActionSheet control in javascript with the following sort of approach:

    $("#MyTestActionSheet").data("kendoActionSheet").open();

    I assume the open method (Which I found in the documentation) is correct but i'm not accessing the Kendo data object correctly to call it. I've tried using "kendoActionSheet" (based on how it is done with other controls) but It doesn't seem to exist and I'm struggling to find documentation on how to do it.

    Am I missing something?

    Thanks in advance,

    Rob

  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 19 Jun 2012 Link to this post

    Hello Rob,

    All Kendo Mobile widgets have the mobile prefix. Hence the correct syntax for your scenario should be: 
    $("#MyTestActionSheet").data("kendoMobileActionSheet").open();

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Grant
    Grant avatar
    1 posts
    Member since:
    Jun 2011

    Posted 20 Jun 2012 Link to this post

    Thats perfect!

    Thanks Iliana!
  4. Maddy
    Maddy avatar
    9 posts
    Member since:
    Jun 2012

    Posted 08 Aug 2012 Link to this post

    This mechanism doesn't work in Blackberry-Playbook & IPad. It error out -> Uncaught TypeError: Cannot read property 'top' of null Any workarounds? 
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 09 Aug 2012 Link to this post

    Hello Maddy,

    Can you reproduce this error with our online demos or it happens just in your project? If that is the case I will need a small but runnable project in order to check what is going on exactly. Thank you in advance for your cooperation. 

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Maddy
    Maddy avatar
    9 posts
    Member since:
    Jun 2012

    Posted 10 Aug 2012 Link to this post

    Hi Iliana,

    Simply the code :  $("#MyTestActionSheet").data("kendoMobileActionSheet").open() doesn't work in Playbook or IPad (in tablet). I want to open the ActionSheet manually from JavaScript in both mobile & tablet devices. It works fine in mobile device but not in tablet.



  7. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 14 Aug 2012 Link to this post

    Hi Maddy,

    In order to get the open() method of the Kendo UI Mobile ActionSheet to work properly in tablets you should define the target for the PopOver. We will update the corresponding topic from our online documentation in a short period of time. Please accept our apologies for the inconvenience caused.
     
    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top