This is a migrated thread and some comments may be shown as answers.

How to open an ActionSheet control in javascript

6 Answers 140 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 1
Grant asked on 19 Jun 2012, 06:49 AM
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

6 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Nikolova
Telerik team
answered on 19 Jun 2012, 02:18 PM
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!
0
Grant
Top achievements
Rank 1
answered on 20 Jun 2012, 05:25 AM
Thats perfect!

Thanks Iliana!
0
Maddy
Top achievements
Rank 1
answered on 08 Aug 2012, 04:17 PM
This mechanism doesn't work in Blackberry-Playbook & IPad. It error out -> Uncaught TypeError: Cannot read property 'top' of null Any workarounds? 
0
Iliana Nikolova
Telerik team
answered on 09 Aug 2012, 04:06 PM
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!
0
Maddy
Top achievements
Rank 1
answered on 10 Aug 2012, 01:41 PM
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.



0
Iliana Nikolova
Telerik team
answered on 14 Aug 2012, 01:35 PM
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!
Tags
General Discussions
Asked by
Grant
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Grant
Top achievements
Rank 1
Maddy
Top achievements
Rank 1
Share this question
or