EasyUI使用小常识

datagrid:
1
//显示某列 2 $('#ListTable').datagrid('showColumn', 'ExRate'); 3 //隐藏某列 4 $('#ListTable').datagrid('hideColumn', 'ExRate');
 1 combotree:            
 2             //加载树形商品分类暂时没完成
 3             $('#ddlGoodTypeList').combotree({
 4                 url: 'GoodsManage.ashx?action=GetGoodsTypeTree',
 5                 valueField: 'id',
 6                 textField: 'text',
 7                 lines: true,
 8                  '180',
 9                 onSelect: function (node) {
10                     //返回数对象
11                     var tree = $(this).tree;
12                     //选中的节点是否为叶子节点,如果不是叶子节点,清除选中  
13                     var isLeaf = tree('isLeaf', node.target);
14                     if (!isLeaf) {
15                         //清除选中  
16                         $('#ddlGoodTypeList').combotree('clear');
17                     }
18                 },
19                 onLoadSuccess: function () {
20                     //$("#ddlGoodTypeList").combotree('tree'); 得到tree对象,再调用tree对象的collapseAll方法
21                     //此方法必须放在onLoadSuccess方法里面才会起作用。
22                     $("#ddlGoodTypeList").combotree('tree').tree("collapseAll");
23                 }
24             });        
原文地址:https://www.cnblogs.com/wgx0428/p/4154717.html