This question is locked. New answers and comments are not allowed.
Hi
I put a combox and a treeview on the cshtml page, If changed the combox selectindex,I want to rebind the treeview by the new selectindex.
This page is ajax hopfully.
@(Html.Telerik().ComboBox()
.Name("cmbleft")
.AutoFill(true)
.SelectedIndex(0)
.DataBinding(binding => binding.Ajax().Select("_AjaxcmbleftHMloading", "Station"))
.HtmlAttributes(new { style = "width: 200px;" })
.ClientEvents(events => events
.OnChange("onComboBoxChange") )
)
@(Html.Telerik().TreeView()
.Name("treeleft")
.DataBinding(binding => binding.Ajax().Select("_Ajaxloading", "Station"))
)
I put a combox and a treeview on the cshtml page, If changed the combox selectindex,I want to rebind the treeview by the new selectindex.
This page is ajax hopfully.
@(Html.Telerik().ComboBox()
.Name("cmbleft")
.AutoFill(true)
.SelectedIndex(0)
.DataBinding(binding => binding.Ajax().Select("_AjaxcmbleftHMloading", "Station"))
.HtmlAttributes(new { style = "width: 200px;" })
.ClientEvents(events => events
.OnChange("onComboBoxChange") )
)
@(Html.Telerik().TreeView()
.Name("treeleft")
.DataBinding(binding => binding.Ajax().Select("_Ajaxloading", "Station"))
)
<script type="text/javascript">
function onComboBoxChange(e) {
var treeView = $("#treeleft").data("tTreeView");
//how to rebind the treeview datasource
// treeView.reload();
};
</script>
thanks for your help.