Update Template content dynamically

4 posts, 1 answers
  1. Rob
    Rob avatar
    59 posts
    Member since:
    Jan 2012

    Posted 10 Jul 2015 Link to this post

    Hey Guys

    Here's another odd one and I wonder if there is any way to do this.

    I use a template to provide additional information about the selection and ideally I want to refresh this every X seconds without having to reload the whole data source.

     Currently this extra info is added using the template:

    template: '<div class="k-state-default"><span class = "left">#: data.Name #</span><span class="right">(#: data.waittime #)</span>',

    Is there any way I can update the 'waittime' part of the template without having to refresh the whole datasource. ? ( I guess reloading the whole datasource will screw up the current selection)

    I'm doubtful , but hopeful :)

    Many thanks In advance

     Rob

     

     

     

     

     

  2. Rob
    Rob avatar
    59 posts
    Member since:
    Jan 2012

    Posted 12 Jul 2015 in reply to Rob Link to this post

    After trying lots of things ( including updating the actual HTML values of the templates via Java) I have settled on just changing to Server side Filtering so I am always returning refreshed wait times when ever the user opens the auto complete or searches.

     

    Seems like a pretty good solution all round.. 

     

    Rob

  3. Kendo UI is VS 2017 Ready
  4. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 14 Jul 2015 Link to this post

    Hello Rob,

    The rendering of the AutoComplete items are directly related to the DataSource. If you would like to update the displayed text, you will need to update the source. Here is a demo that shows how to accomplish this task:
    Regards,
    Georgi Krustev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Rob
    Rob avatar
    59 posts
    Member since:
    Jan 2012

    Posted 11 Aug 2015 in reply to Georgi Krustev Link to this post

    Thanks . that could be very useful for future projects :)
Back to Top
Kendo UI is VS 2017 Ready