$('#selShenqFuwujg').combotree({
url: '../../GetFuwujgInfo.aspx?type=GetFuwujgTree&PID=',
onLoadSuccess: function (node, data) {
if (!loadFlag && data != null) {
node = $('#selShenqFuwujg').combotree("tree").tree("find", data[0].id);
loadFlag = true;
//for (i = 0; i < node.length ; i++) {
// node = $('#selShenqFuwujg').combotree('tree').tree('find', node[i]);
// $('#selShenqFuwujg').combotree('tree').tree('check', node.target);
// $('#selShenqFuwujg').combotree('tree').tree('expandAll', node.target);
//}
//debugger;
//$('#selShenqFuwujg').combotree("setValue", data[0].id);
$('#selShenqFuwujg').combotree('setValue', { id: data[0].id, text: data[0].text });
//$('#selShenqFuwujg').combotree("check", data[0].id);
}
},
onBeforeExpand: function (node) {
var children = $('#selShenqFuwujg').combotree("tree").tree('getChildren', node.target);
if (children.length < 1) {
trnode = node.id;
$('#selShenqFuwujg').combotree("tree").tree("options").url = '../../GetFuwujgInfo.aspx?type=GetFuwujgTree&PID=' + node.id;
}
},
onChange: function (newValue, oldValue) {
}
});
重点 实现就一句
$('#selShenqFuwujg').combotree('setValue', { id: data[0].id, text: data[0].text });
注意easyui的版本
其他实现方式请参考文末的[参考文献]
ui15HxuSTE8K4I5UoduCikUW9sF0L+AeUqXS2ZYcGgbtX6y9N2sgIXj7t2tdVuUkUXjQIw07pmpW8kf4dsAaF57DErBAAVTfrD744z8U0a50m6Ylijf/sjVyDuDzCvulXz+2yByNbN/Wx6IfeNeDYttsqR97o62E32bWzqxjjgs=
参考文献:
[1]http://bbs.csdn.net/topics/370205131
[2]http://aokunsang.iteye.com/blog/1489204
[3]http://blog.csdn.net/zhu_nana/article/details/50036275
[4]http://www.cnblogs.com/jingsha/p/5596745.html