Quotes? :)

7 posts, 0 answers
  1. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 01 Apr 2012 Link to this post

    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...
  2. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 01 Apr 2012 Link to this post

    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)
  3. Kendo UI is VS 2017 Ready
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 02 Apr 2012 Link to this post

    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!
  5. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 02 Apr 2012 Link to this post

    Well...huh...weird

    I'm gonna try to figure this one out then...using the same version that's on the demos page
  6. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 02 Apr 2012 Link to this post

    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...
  7. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 04 Apr 2012 Link to this post

    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!
  8. John
    John avatar
    1 posts
    Member since:
    Apr 2012

    Posted 12 Apr 2012 Link to this post

    Great .. I was just looking for this today, thanks.

    _____________________________
    Best auto repair san francisco
Back to Top
Kendo UI is VS 2017 Ready