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

string array in data template

1 Answer 466 Views
Templates
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 16 Aug 2012, 07:00 AM
Hi,

I have created a simple datasource wich gets a string array from a service.
The data that the service returns is in jsonp format.
The data the datasource returns is correct when i debug the code with chrome,
but i cant get it working with a datatemplate.

this is my code of the data-template:
<input type="checkbox"/>#: this#

but when i try to show this, I get a list of [Object] object.

How can I get the string value out of this object?

this post:
http://www.kendoui.com/forums/framework/mvvm/syntax-for-string-template-attr-binding.aspx 
showed that it can be done with "this", but thats what im doing right now.

1 Answer, 1 is accepted

Sort by
0
Charles Benoualid
Top achievements
Rank 1
answered on 06 May 2013, 06:21 PM
you need to use

<span data-bind="text: this"></span>
Tags
Templates
Asked by
Richard
Top achievements
Rank 1
Answers by
Charles Benoualid
Top achievements
Rank 1
Share this question
or