columns: [[
{ field: 'Source_Id', title: 'Source_Id', hidden: true },
//{ field: 'Current_Value', hidden: true },
{ field: 'Source_Type_Id', title: 'Source_Type_Id', hidden: true },
{
//field: 'Object_Name', title: SIMS_lang.ColumnsField.Signal, width: 300, editor: {
field: 'Object_Id', title: SIMS_lang.ColumnsField.Signal, width: 300, editor: {
//field: 'station_type_name', title: SIMS_lang.ColumnsField.Signal, width: 300, editor: {
type: 'combotree',
options: {
data: treeData,
onBeforeSelect: function (node) {
var ed = $("#divELlink" + pNo).datagrid('getEditors', clickIndex);
if (node.attributes.Object_Type_Id == 3) {
$.messager.show({
title: SIMS_lang.DialogTitle.Prompt,
msg: SIMS_lang.MessageStr.PleaseSelectMeasure,
timeout: 3000,
showType: 'slide'
});
if (ed && ed.length != 0) {
$(ed[1].target).combobox('disable');
$(ed[2].target).combobox('disable');
}
return false;
}
return true;
},
onSelect: function (node) {
comData = "";
var ed = $("#divELlink" + pNo).datagrid('getEditors', clickIndex);
if (node.attributes.Object_Type_Id == 3) {
$.messager.show({
title: SIMS_lang.DialogTitle.Prompt,
msg: SIMS_lang.MessageStr.PleaseSelectMeasure,
timeout: 3000,
showType: 'slide'
});
if (ed && ed.length != 0) {
$(ed[1].target).combobox('disable');
$(ed[2].target).combobox('disable');
}
return;
}
else {
if (ed && ed.length != 0) {
$(ed[1].target).combobox('enable');
$(ed[2].target).combobox('enable');
}
}
if (node.attributes.Object_Type_Id == 4) {
$.ajax({
type: "post",
url: "/RealTimeMonitor/GetEventLinkage",
data: { objectid: node.id, queryType: 5 },
success: function (data) {
$(ed[1].target).combobox({
valueField: 'id',
textField: 'name',
data: data,
onLoadSuccess: function () {
if (tempSourceValue != null) {
$(ed[1].target).combobox('select', tempSourceValue);
tempSourceValue = null;
}
else {
if (data.length > 0) {
$(ed[1].target).combobox('select', data[0].id);
}
}
}
});
comData = data;
}
});
$(ed[2].target).combobox({
valueField: 'id',
textField: 'name',
data: [{ id: '0', name: '0' }]
});
$(ed[2].target).combobox('select', 0);
$(ed[2].target).combobox('disable');
}
else {
$(ed[1].target).combobox('clear');
$(ed[1].target).combobox({
valueField: 'id',
textField: 'name',
data: [{ id: '', name: '' }]
});
$(ed[2].target).combobox('enable');
}
var nn = $(ed[0].target).combotree('tree').tree('getSelected');
if (nn) {
$(ed[0].target).combotree('tree').tree('expandTo', nn.target);
}
}
}
},
formatter: function (value, row, index) {
if (value != "") {
for (var i = 0; i < treeData.length; i++) {
if (value == treeData[i].id) {
row.Source_Id = value;
row.Source_Type_Id = treeData[i].attributes.Object_Type_Id;
return treeData[i].text;
}
var child = treeData[i].children;
for (var j = 0; j < child.length; j++) {
if (value == child[j].id) {
row.Source_Id = value;
row.Source_Type_Id = child[j].attributes.Object_Type_Id;
return child[j].text;
}
}
}
}
return value;
}
},
{ field: 'Source_Value_Low', title: SIMS_lang.ColumnsField.ContorlValue, hidden: true },
{
//field: 'Source_Value_Low', title: SIMS_lang.ColumnsField.ValueLowLimit, width: 200, editor: { type: 'combobox', options: { width: 200 } },
field: 'Contrl_means', title: SIMS_lang.ColumnsField.ValueLowLimit, width: 200, editor: {
type: 'combobox', options: {
width: 200
}
},
formatter: function (value, row, index) {
if (comData != "" && comData.length != 0) {
for (var i = 0; i < comData.length; i++) {
//if (value == comData[i].State_Value) {
// row.Source_Value_Low = value;
// return comData[i].State_Means;
//}
if (value == comData[i].id) {
row.Source_Value_Low = value;
return comData[i].name;
}
}
} else {
//if (value.length>0) {
// var alarmValue = parseInt(row.Current_Value).toString();
// var s = value.replace(/{/g, '').replace(/}/g, '').replace(/"/g, '');
// arrayObj = new Array();
// arrayObj2 = new Array();
// arrayObj = s.split(',');
// for (var i = 0; i < arrayObj.length; i++) {
// arrayObj2 = arrayObj[i].split(':');
// if (arrayObj2[0] == alarmValue) {
// return arrayObj2[1];
// }
// }
//}
//else {
return value;
//}
}
}
},
{
field: 'Source_Value_High', title: SIMS_lang.ColumnsField.ValueHighLimit, width: 200, editor: { type: 'combobox', options: { width: 200 } }
}
]]

datagrid columns的更多相关文章

  1. [No0000123]WPF DataGrid Columns Visibility的绑定

    场景:根据配置文件显示DataGrid中的某些列. 问题:Columns集合只是DataGrid的一个属性,这个集合在逻辑树或视觉树中是看不到的,也不会继承DataContext属性. 方法一:对Da ...

  2. draggable datagrid columns

    $.extend($.fn.datagrid.methods,{ columnMoving: function(jq){ return jq.each(function(){ var target = ...

  3. easyui datagrid columns 如何取得json 内嵌对象(many-to-one POJO class)

    http://www.iteye.com/problems/44119 http://hi.baidu.com/lapson_85/item/7733586e60b08500a1cf0f8d ———— ...

  4. EasyUI datagrid columns 中 field 区分大小写

    columns: [ [ {field: 'id', title: 'ID'}, {field: 'name', title: 'NAME'}, {field: 'DT_CRT_TM', title: ...

  5. easyui datagrid columns的field支持属性的子属性(field.sonfield形式或者格式化程序形式)

    var col=$(_758).datagrid("getColumnOption",_75e);if(col){//var _75f=_75c[_75e];var _75f=un ...

  6. easyui datagrid columns field 如何支持一个或多个子属性

    //如果只需要一个子属性从value出发 {field:'customer',title:'会员手机',width:100, formatter: function(value,row,index){ ...

  7. How to Add Columns to a DataGrid through Binding and Map Its Cell Values

    How to Add Columns to a DataGrid through Binding and Map Its Cell Values Lance Contreras, 7 Nov 2013 ...

  8. DataGrid 列头实现国际化语言切换

    <DataGrid> <DataGrid.Columns> <DataGridTextColumn Binding="{x:Null}" Width= ...

  9. DataGrid控件使用

    应用Binding显示后台数据 <UserControl x:Class="demo03.View.UserInfoList"             xmlns=" ...

随机推荐

  1. 【树莓派】树莓派raspi-config配置

    发现有些树莓派盒子,输入的结果和键盘的实际字符有差异,比如输入 | ,结果显示为 ~. 这是因为树莓派的键盘设置问题. 可以通过设置raspi-config进行配置: 第一次使用树莓派的时候需要进行一 ...

  2. Java 并发:内置锁 Synchronized

    摘要: 在多线程编程中,线程安全问题是一个最为关键的问题,其核心概念就在于正确性,即当多个线程訪问某一共享.可变数据时,始终都不会导致数据破坏以及其它不该出现的结果. 而全部的并发模式在解决问题时,採 ...

  3. GameCenter 使用指南

    原地址:http://www.cocoachina.com/gamedev/misc/2010/1022/2229.html GameCenter 为单机游戏为主的 iPhone 游戏平台引入了社会化 ...

  4. Jquery重新学习之五[操作JSON数据]

    Jquery操作Json格式的数据在我们平时的项目中也经常运用:最近看Jquery权威指南中就有一章节是对这方面的整理总结:最后通过一个Asp.net结合一般处理程序ashx的实例,基本上能满足项目中 ...

  5. MS SQL得到指定日期的当月月末

    MS SQL得到指定日期的当月月末 declare @ddate date ,,)) select @ddate --2016-01-31 declare @ddatetime datetime ,, ...

  6. SpringMVC中使用-sqljdbc4.jar

    昨天将现在写的Web项目中的数据库由MySQL换成SQLServer,昨天想把MySQL重新安装一下,但是由于不明原因,导致无法安装. 卸载MySQL.删除安装文件.删除注册表.重启电脑.但是安装的时 ...

  7. LaTeX 中文段首空格问题

    一般用 “\\”或者回车可以使得下一段段首空两格,但是对于第一段就不行了. 解决办法:  加一个\usepackage{indentfirst}就可以

  8. ibatis/mybatis显示sql语句 log4j.properties配置文件

    将ibatis/mybatis log4j运行级别调到DEBUG可以在控制台打印出ibatis运行的sql语句,方便调试: ### 设置Logger输出级别和输出目的地 ### log4j.rootL ...

  9. android 屏幕上面画线

    作业如下:在android屏幕上面任意画线 package feng.f121.drawline;//本人创建的包名,每人有每人的不同的包 import java.security.PublicKey ...

  10. EntityFramework Data Annotations

    详细的实体映射介绍(Data Annotation) http://msdn.microsoft.com/en-us/data/jj591583