refresh (ajax binding)

6 posts, 0 answers
  1. Shahar
    Shahar avatar
    12 posts
    Member since:
    Jul 2010

    Posted 07 Jul 2013 Link to this post

    Hi,
    I configured the Kendo MultiSelect for ajax binding, I send parameters to the server, All as described in
    http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/multiselect/overview#sending-parameters-to-the-server
    Everything works fine except my call to the refresh method (http://docs.kendoui.com/api/web/multiselect).
    The thing is that a new ajax request does not occur when I call refresh (is it by design? should I use another API?),
    I need the List Of Values to be updated by a new Ajax call on change of another control.
    The parameters I send to the server are

    1. the text typed
    2. a value of another control

    Thanks in advanced,

    Lauri

     

     

  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 10 Jul 2013 Link to this post

    Hello Shachar,

    The refresh method of the MultiSelect will redraw (re-render) the widget as described in the documentation. To perform re-fetch of the data from the server you should use the read method of the dataSource.

    //if you have specified data function
    //you just need to call the method like this
    $('#myMultiSelect').data('kendoMultiSelect').dataSource.read();
    //or you can send extra parameters like this
    $('#myMultiSelect').data('kendoMultiSelect').dataSource.read({text:$('#someInput').val()});


    Kind Regards,
    Petur Subev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Oliver
    Oliver avatar
    3 posts
    Member since:
    Jul 2013

    Posted 17 Feb in reply to Petur Subev Link to this post

    Hello Petur Subev,

    can I create a complete object instead if {text:$('#someInput').val()} to re-read. I need this functionality to reset the box to the state before changing. I store the dataSource and value and dataItems, but what can I do to reset the control?  

     My original question you will found here:

    http://www.telerik.com/forums/how-to-prevent-multiselect-from-deleting-items

    Kind regards,

    Oliver

  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 19 Feb Link to this post

    Hello Oliver,

    My colleague already answered to the other thread opened you mentioned. I would like to ask you continue discussion in only one thread to avoid duplication.

    Regards,
    Georgi Krustev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Ivett
    Ivett avatar
    4 posts
    Member since:
    Aug 2016

    Posted 25 Nov Link to this post

    Hi,

    I need Refresh data in multiselect after add new item in my database.
    To the add new item send  in ajax JQuery and to the return in part the success i need refresh multiselect .

    Could you tell me some way to do it?

    Since in other components like the grid we can refresh it as something like this
      $ ( '# Multi'). Date ( 'kendoMultiselect'). Refresh ();

  7. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 29 Nov Link to this post

    Hello Yazmin,

    In general, the MultiSelect widget also has refresh method:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect#methods-refresh

    This method will re-render the multiselect popup items, which will happen anyway if the source is updated. You can see how we add new items in the MultiSelect source here:

    http://demos.telerik.com/kendo-ui/multiselect/addnewitem

    As you can see once, the source is updated, the list is re-rendered.

    Let me know if I am missing something.

    Regards,
    Georgi Krustev
    Telerik by Progress
    Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready