|
Title: combotree don't show default value on tree panel Post by: china-ding on April 07, 2019, 11:24:45 PM when I use combotree,I need 2 step.
1.get tree data by ajax from server. 2.set the combotree default value. now the question is : default value is response by MVC DataBag,in HTML,it just a string,like <input...value='Java' /> ,but the server is too slow,the ajax need some second. when I show the tree panel,the default value don't show "item-selected" in the tree panel. I think a way that set the default value in event window.load(),and it worked! but when the combotree in datagrid's editor,I can't set it. I think when set default value, tree item has not create, so tree can't set class "item-selected". Title: Re: combotree don't show default value on tree panel Post by: jarry on April 07, 2019, 11:45:27 PM When calling 'setValue' method to set the combotree's value, you can pass it an object that contains the 'value' and 'text' properties to initialize the value and the displaying text on the inputing box.
Code: $('#ct').combotree({Title: Re: combotree don't show default value on tree panel Post by: china-ding on April 09, 2019, 04:43:42 AM yes,it worked!
thank you. |