Dropdownlist ajaxRequest

2 posts, 0 answers
  1. Mohammed Adel
    Mohammed Adel avatar
    2 posts
    Member since:
    Mar 2012

    Posted 05 Jul 2012 Link to this post

    hi all,
    i was wondering how to make the dropdownlist update its data like in Telerik MVC.

    // Gets the ComboBox
    var drop = $("#Parent").data("tComboBox");
    
    // Reload the ComboBox data
    drop.reload();
    Thanks in advance Mohammed Adel
  2. Vesselin Obreshkov
    Vesselin Obreshkov avatar
    81 posts
    Member since:
    Jan 2010

    Posted 06 Aug 2012 Link to this post

    Are you using Ajax binding (.DataSource(ds => ds.Ajax().Read(r => r.Action("JsonAction", "Controller")))?

    If so you need to refresh the underlying dataSource object that feeds the DropDown like so:

    // Get reference to Kendo DropDownList object
    var dropDownList = $('#Parent').data('kendoDropDownList');
     
    // Read new data from server
    dropDownList.dataSource.read();
     
    // Refresh drop down list items
    dropDownList.refresh();
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top