This is a migrated thread and some comments may be shown as answers.
Dropdownlist ajaxRequest
1 Answer 133 Views
This is a migrated thread and some comments may be shown as answers.
Mohammed Adel
Top achievements
Rank 1
Mohammed Adel asked on 05 Jul 2012, 12:18 PM
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

1 Answer, 1 is accepted

Sort by
0
Vesselin Obreshkov
Top achievements
Rank 2
answered on 06 Aug 2012, 09:48 PM

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();
Asked by
Mohammed Adel
Top achievements
Rank 1
Answers by
Vesselin Obreshkov
Top achievements
Rank 2
Share this question
or