easyui beginEdit多行编辑时速度感人

begyl 2017-09-07 07:31:46
$("#tt3").datagrid({
url: pageColumnMappingData,
method: 'GET',
pageSize: 1000,
width:'100%',
height:'90%',
queryParams: {"sourceId":source_id_all,"model":false},
pagination: false,
pageList: [10, 20, 50, 100, 150, 200],
showFooter: true,
singleSelect : false,
columns: [[
{field : 'ck', checkbox : true, width : 2,hidden:true}, //显示复选框
{field:'row',title: '行数', width: '4%',align: 'center',formatter:function(value,row,index){
return ++index;
}},
{ field: 'classify', title: '分类', width: '10%',align: 'center', editor: {
type: "combobox",
options: {
valueField: "id",
textField: "text",
data: [{ id: "基础", text: "基础" }, { id: "DSR", text: "DSR" },
{ id: "统计", text: "统计" },{ id: "通用", text: "通用" },
{ id: "交易", text: "交易" },{ id: "评论", text: "评论" }],
panelHeight: 100,
required: true
}
}},

{ field: 'id', title: 'id', width: '10%',align: 'center',hidden : true},
{ field: 'colname', title: '名字', width: '10%',align: 'center', editor: {
type: "text",
options: {
required: true
}
}},
{ field: 'dataType', title: '类型', width: '10%',align: 'center' ,editor: {
type: "combobox",
options: {
valueField: "id",
textField: "text",
data: [{ id: "varchar", text: "varchar" }, { id: "int2", text: "int" },
{ id: "int4", text: "int4" },{ id: "int8", text: "int8" },
{ id: "decimal", text: "decimal" },{ id: "datetime", text: "datetime" },
{ id: "float4", text: "float4" },{ id: "bigint", text: "bigint" },
{ id: "int", text: "int" },{ id: "date", text: "date" },
{ id: "numeric", text: "numeric" },{ id: "tinyint", text: "tinyint" }],
panelHeight: 100,
required: true
}
}},
{ field: 'dataLength', title: '长度', width: '8%' ,align: 'center', editor: {
type: "text",
options: {
required: true
}
}},
{ field: 'pointNum', title: '小数位', width: '6%' ,align: 'center', editor: {
type: "text",
options: {
required: true
}
}},
{ field: 'sourceMode', title: '来源方式', width: '10%',align: 'center' ,editor: {
type: "combobox",
options: {
valueField: "id",
textField: "text",
data: [{ id: "直接抓取", text: "直接抓取" }, { id: "手动填写", text: "手动填写" },
{ id: "匹配", text: "匹配" },{ id: "计算", text: "计算" },{ id: "记录", text: "记录" }],
panelHeight: 100,
required: true
}
}},
{ field: 'masthasdata', title: '是否必须有数据', width: '10%',align: 'center',editor: {
type: "combobox",
options: {
valueField: "id",
textField: "text",
data: [{ id: "false", text: "false" }, { id: "true", text: "true" },],
panelHeight: 50,
required: true
}
}},
{ field: 'colremark', title: '字段说明', width: '22%',align: 'center', editor: {
type: "text",
options: {
required: true
}
}},
{ field: 'sortOrder', title: '字段顺序', width: '10%',align: 'center', editor: {
type: "numberbox",
options: {
required: true
}
}}

]],
});

var rows=$('#tt3').datagrid("getRows");
for(var i=0,len=rows.length;i<len;i++){
$('#tt3').datagrid("beginEdit",i);
}

40条数据差不多要10多秒!!!!!!!!!!!
...全文
1024 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lllgooo 2018-01-08
  • 打赏
  • 举报
回复
lz解决了吗?
夜明小肥猪 2017-11-27
  • 打赏
  • 举报
回复
LZ用的是IE6吗?感觉IE8以后,速度就还可以了,是不是后台操作慢
代码之城 2017-11-24
  • 打赏
  • 举报
回复
我都是自己写一个,不用他们的
jar4161 2017-11-23
  • 打赏
  • 举报
回复
有什么好到方案解决吗 循环渲染太多次了

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧