目前用到最全的datagrid(easyui)
包含checkbox、复合表头、多行可编辑单元格、combobox单元格,就差上次做的table中每行中的关联检索combobox单元格了。
目前已修改为单行编辑,多行编辑时的check有问题
$("#add").click(function(){
var index=$('#dataGrid').datagrid('appendRow', {
FlowTypeName: 'new name',
FlowTypeCode: 30
}).datagrid('getRows').length-1;
$('#dataGrid').datagrid('beginEdit',index);
});
$(function () {
var datagrid;
var status = { "statusResult": [
{ "statusKey": "ALL", "statusVaule":"全部" },
{ "statusKey": "70", "statusVaule":"已开入WA提单" },
{ "statusKey": "80", "statusVaule":"已入WA库" }]};
console.info(status.statusResult);
datagrid = $('#dataGrid').datagrid({
url: "/purchase/findPredictingStockDetailList.html",
fit: true,
fitColumns: false,
toolbar: $('#tb'),
singleSelect: true,
nowrap: true,
rownumbers: true,
singleSelect: false,
selectOnCheck: true,
checkOnSelect: true,
onClickCell: function(index,field,value){
$(this).datagrid('beginEdit', index);
var ed = $(this).datagrid('getEditor', {index:index,field:field});
$(ed.target).focus();
// $(ed).blur(function(){
// alert(1111111111111111);
// $(this).datagrid('endEdit', index);
// });
},
queryParams: {
report_year_week: "$!report_year_week"
},
columns: [
[
{field:'check',title:'选择',width:40,align:'center', rowspan:2,
checkbox:true
},
{field:'aa',title:'启用',width:60,align:'center', rowspan:2
},
{title:'判断方式',align:'center',colspan:2},
{title:'关闸方式',align:'center',colspan:5},
{field:'aaa',title:'说明',width:300,align:'left', rowspan:2
},
],[
{field:'projectID',
title:'渠道',
width:100,
editor:{
type:'combobox',
options:{
data:status.statusResult,
valueField:'statusKey',
textField:'statusVaule',
panelHeight:'auto',
editable:false,
onSelect:function(record){
}
}
}
},
{field: 'FlowTypeCode', title: '超期库龄', width: 80, align: 'right',
editor: {
type: 'text',
options: { required: true }
}
},
{field:'col4',title:'渠道',width:100,rowspan:1},
{field:'name1',title:'品牌',width:100,rowspan:1},
{field:'addr1',title:'品类',width:100,rowspan:1},
{field:'col41',title:'型号',width:100,rowspan:1},
{field:'ss',title:'库位',width:100,rowspan:1}
]
]
});
$('#dataGrid').parent().find("div .datagrid-header-check").children("input[type='checkbox']").eq(0).attr("checked", false);
});
目前用到最全的datagrid(easyui)的更多相关文章
- EasyUI datagrid easyui datagrid +dialog 加载 可直接运行 七
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta ht ...
- Js全反选DataGrid
// **************************************************************** // // function Trim(value) // -- ...
- 大前端-全栈-node+easyui+express+vue+es6+webpack+react
作者声明:本博客中所写的文章,都是博主自学过程的笔记,参考了很多的学习资料,学习资料和笔记会注明出处,所有的内容都以交流学习为主.有不正确的地方,欢迎批评指正 视频来源:https://www.bil ...
- 基于MVC4+EasyUI的Web开发框架形成之旅--界面控件的使用
在前面介绍了两篇关于我的基于MVC4+EasyUI技术的Web开发框架的随笔,本篇继续介绍其中界面部分的一些使用知识,包括控件的赋值.取值.清空,以及相关的使用. 我们知道,一般Web界面包括的界面控 ...
- 转--基于MVC4+EasyUI的Web开发框架形成之旅--界面控件的使用
原文 http://www.cnblogs.com/wuhuacong/p/3317223.html 基于MVC4+EasyUI的Web开发框架形成之旅--界面控件的使用 在前面介绍了两篇关于我的基 ...
- 毕业设计 ASP.Net+EasyUI开发 X X露天矿调度管理信息系统(一)
开篇介绍关于EasyUI技术,界面部分的一些使用知识,包括控件的赋值.取值.清空,以及相关的使用. 我们知道,一般Web界面包括的界面控件有:单行文本框.多行文本框.密码文本框.下拉列表Combobo ...
- (转)基于MVC4+EasyUI的Web开发框架形成之旅--界面控件的使用
原文地址:http://www.cnblogs.com/wuhuacong/p/3317223.html 在前面介绍了两篇关于我的基于MVC4+EasyUI技术的Web开发框架的随笔,本篇继续介绍其中 ...
- UI、JS框架----Bootstrap、Metro
Bootstrap Datagrid EasyUI Metro bootstrap Datepicker Editable for Bootstrap:bootstrap-editable.js X- ...
- ylz简单增删改查实现
首先用generator实现三个文档 分别是实体类(domain文件夹下) xml配置和dao层文件. resource文件夹下 注意位置事先写死了,要根据要求文档来定义位置. package com ...
随机推荐
- URL动态赋值
url动态赋值: 指的是url中包含{selector},即花括号括起来的jQuery选择器,当提交该url时,框架会自动将selector对应元素的值替换到花括号所占区域. (感觉实现了一点类似el ...
- Struts2标签<s:textfield/>
中的name="",取值顺序是,如不加#,先从root中栈顶取,没有取到(即使栈顶有这个属性但是属性为空还是向下取,这点和el表达式不同)就去actioncontext的map中取 ...
- jQuery 常用动画
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- poj1179
//Accepted 244 KB 0 ms //区间dp //石子合并模型 #include <cstdio> #include <cstring> #include < ...
- 显示pdf
document.all[document.all.PDFNotKnown ? "IfNoAcrobat" : "IfAcrobat"].style.displ ...
- Image Generator (Image Builder)
如果你想要下载一个预编译好的镜像文件,或者想要尝试整个编译过程,一个替代方案是使用镜像生成器(Image Generator)(以前被叫做Image Builder).这是一个预编译好的OpenWrt ...
- 2016 - 1- 19 利用多线程优化从网上加载图片的Demo
// // ZZTableViewController.m // 多图片下载 // // Created by Mac on 16/1/19. // Copyright © 2016年 Mac. Al ...
- A problem needed to review and fix later
urllib2.URLError:<urlopen error [Errno 110] Connection timed out> still have no idea how to fi ...
- What is hmux in resin?
When I start the Resin server it says hmux listening to localhost:6802 What is this hmux? Is this a ...
- Drools规则文件结构说明
一.规则文件构成 package(规则文件所在包) import(导入java包) global(规则文件中的"全局变量") function(函数) query(查找) rule ...