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

Mobile Action Sheet data-actionsheet-context

1 Answer 68 Views
HTML5, CSS, JavaScript
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan
Top achievements
Rank 1
Ryan asked on 03 Jun 2015, 04:34 PM

Hello.

I'm frustrated with the lack of support for the mobile action sheet, specifically the fact that the only examples online simply have you set the data-actionsheet-context to a simply string argument. This is rarely practical, as there is almost always a need here to pass in data from a datasource, however all I've managed to achieve is getting data from a vm through data-bind="text:example.exampleId". How, or specifically what is the syntax for, setting data-actionsheet-context to a string that is bound such as from the data-bind=""? Do you have to data-bind"source: " in order to be able to get at the data. Nothing seems to be working other than passing in a literal string.

 Thank you in advance for any feedback.

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 08 Jun 2015, 07:13 AM
Hello Ryan,

You can bind the the action sheet context to a value from the data context using a binding expression, as shown in this demo:
ActionSheet / Basic usage

<a class="reply"
    data-role="button"
    data-rel="actionsheet"
    href="\\#inboxActions"
    data-actionsheet-context="#:ID#">Reply</a>

where ID is a value from the data context in which the button is defined, in this case a ListView data item.

Regards,
Tsvetina
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
HTML5, CSS, JavaScript
Asked by
Ryan
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or