简体   繁体   中英

How to access a javascript variable in kendo-UI function?

I have an issue with kendo-UI treeview and Ajax call. I have a dropdown and on dropdown change event I want to call an ajax, by this ajax call my treeview is refreshed and all data are changed. It means on dropdown change event call an ajax and update record of treeview.

code is :-

<script>
var id ;
$("drop").change()
{
   id = $("drop.selected").value();
}

$("treeview").kendoUI.Treevoew()
{
     //i want to use that id value in this function but i can't why?
});
</script>

I use jquery 1.10.2.Please suggest me how can i achive this functionality.

Thank you all

Regards,

vinit

我相信要从剑道下拉菜单中获得价值,您必须这样做:

id = $('#mydropdown').data('kendoDropDownList').value();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM