This is a migrated thread and some comments may be shown as answers.
Quotes? :)
6 Answers 119 Views
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 2
Steve asked on 01 Apr 2012, 09:44 PM
How do I put quotes around the ${Desc} value I want to pass to the researchItem function? :)

var lastusedSingleTemplate = kendo.template("<li id='last-used-ndb-${NDB_No}' data-ndbno='${NDB_No}' onclick='researchItem(${Desc})' class='re-search-item'>${Desc}</li>");

...prob a simple javascript question, I'm just not sure how...

6 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 2
answered on 01 Apr 2012, 09:53 PM
If I do this

var lastusedSingleTemplate = kendo.template("<li id='last-used-ndb-${NDB_No}' data-ndbno='${NDB_No}' onclick='researchItem(\"${Desc}\")' class='re-search-item'>${Desc}</li>");

Kendo.web throws this error (attached)
0
Alexander Valchev
Telerik team
answered on 02 Apr 2012, 07:38 AM
Hello Steve,

Your second code snippet looks OK, what version of KendoUI are you testing with?
I tried a similar scenario with the latest official release and I got it working on my side. Please check the example and let me know if I missed something.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Steve
Top achievements
Rank 2
answered on 02 Apr 2012, 01:42 PM
Well...huh...weird

I'm gonna try to figure this one out then...using the same version that's on the demos page
0
Steve
Top achievements
Rank 2
answered on 03 Apr 2012, 04:13 AM
Ok, so turns out it was working fine...but something else has changed in this release that used to work

function clearDropDowns() {
    _fromCombo.dataSource.data(null);
    _toCombo.dataSource.data(null);
}

This is the line that was causing the error...
0
Alexander Valchev
Telerik team
answered on 04 Apr 2012, 01:34 PM
Hi Steve,

The data method accepts as a parameter an array of objects. If you want to reset the data, I suggest to pass an empty array as a parameter. For example:

_fromCombo.dataSource.data([]);

I hope this will solve the problem.

All the best,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
John
Top achievements
Rank 1
answered on 12 Apr 2012, 07:37 AM
Great .. I was just looking for this today, thanks.

_____________________________
Best auto repair san francisco
Asked by
Steve
Top achievements
Rank 2
Answers by
Steve
Top achievements
Rank 2
Alexander Valchev
Telerik team
John
Top achievements
Rank 1
Share this question
or