EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: cdtuql on January 01, 2015, 08:45:53 PM



Title: why I can't use setValue to set the combotree init value?
Post by: cdtuql on January 01, 2015, 08:45:53 PM
hi
when I use dialog 's onload event to init the combotree value ,but it did not success
onLoad:function(){
       var node= $('#dishes_dishes_dishesclass_tree').tree('getSelected');
       $('#itemclassNo').combotree('setValue',node.id);   
    },

but when i add a alert(node.id) before the setValue,It's success, like this:
onLoad:function(){
       var node= $('#dishes_dishes_dishesclass_tree').tree('getSelected');
       alert(node.id);
       $('#itemclassNo').combotree('setValue',node.id);   
    },
how can i do ,thanks


Title: Re: why I can't use setValue to set the combotree init value?
Post by: stworthy on January 02, 2015, 08:25:19 AM
How do you define your dialog and the content page? Please describe your question in more details, or provide an example to demonstrate your issue.