easyui treegrid的使用示例
2015-06-23 15:10
483 查看
一、前端:
View Code
三、注意事项:
对应的ViewModel中必须有 _parentId 和 state 属性,iconCls 可选。
四、实现效果如下:
public ActionResult MenuIndex(FormCollection form) { //取从数据字典中取中Menu对应的ID号 var dic = _dictionaryService.Single(o => o.Name == "MENU" && o.IsDeleted == false); var menuId = dic.Id; //查询所有菜单信息 var menus = _actionService.Where(o => o.IsDeleted == false && o.OperationType == menuId && o.IsShow == true, o => o.DisOrder, true, "FormMethodDictionary", "OperationTypeDictionary").ToList(); //构造TreeGrid的数据 RSCC.Model.PageData<ActionViewModel> treegrids = new RSCC.Model.PageData<ActionViewModel>(); treegrids.total = menus.Count(); treegrids.rows = menus.Select(o => o.ToViewModel()).ToList(); //转化为JSON格式 var strJson = operationContext.ToJson(treegrids); return Content(strJson); }
View Code
三、注意事项:
对应的ViewModel中必须有 _parentId 和 state 属性,iconCls 可选。
四、实现效果如下:
相关文章推荐
- IOS键盘的相关设置(UITextfield)
- com.mysql.jdbc.PacketTooBigException: Packet for query is too large (2017898 > 1048576)
- duilib list 获取选中的行ID 获取行数 获取行指针 获取本行索引
- duilib list 去掉表头
- UITextView的使用详解
- String、StringBuffer 和 StringBuilder的区别
- iOS开发-带Placeholder的UITextView实现
- iOS开发之UITextView,设置textView的行间距及placeholder
- leetCode(26):Unique Binary Search Trees
- leetCode(26):Unique Binary Search Trees 分类: leetCode 2015-06-23 14:09 155人阅读 评论(0) 收藏
- Longest Palindrome Subsequence
- 使用.bat文件运行ant的build.xml
- arm交叉编译器gnueabi、none-eabi、arm-eabi、gnueabihf、gnueabi区别
- 构建验证测试BVT--Build Verification Test
- 在NGUI中高效优化UIScrollView之UIWrapContent的简介以及使用
- debug - UITextField 输入完跳入下一field,按钮变化
- EasyUI-解决EasyUI 加载两次url的问题
- [mysql]ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value 解决方法
- 最新全功能DNV sesam suite 2013 Full 1CD包含新的 DeepC 、GeniE和HydroD模块.
- JDBC实例之—手机号码归属地查询(GUI版本)