Extjs4.1动态更新Ext.grid.PropertyGrid创建的propertyGrid的内容
来源:互联网 发布:网络延长线接法 编辑:程序博客网 时间:2024/05/18 03:21
一、定义 PropertyGrid'
this.propertyGrid =Ext.create('Ext.grid.PropertyGrid', {
title: '车辆当前状态',
id: 'propGrid',
source: {
"车牌号码": "鄂A.N1002",
"行驶速度": 80.0,
"行驶方向": "北偏东",
"所在位置": "深圳市南山区科技园南区白石路",
"定位时间": Ext.Date.parse('10/15/2006', 'm/d/Y'),
"上报时间": Ext.Date.parse('10/15/2006', 'm/d/Y')
}
});
二、放入页面上的指定位置
var viewport = Ext.create('Ext.Viewport', {
id: 'border-example',
layout: 'border',
items: [{
region: 'north',
height: 32,
items:toolbar
}, {
region: 'south',
split: true,
height: 100,
minSize: 100,
maxSize: 200,
collapsible: true,
collapsed: true,
title: '日志输出',
margins: '0 0 0 0',
items: [loggridpanel]
}, {
xtype: 'tabpanel',
region: 'east',
title: '行驶状态',
animCollapse: true,
collapsible: true,
split: true,
width: 225,
minSize: 175,
maxSize: 400,
margins: '0 5 0 0',
activeTab: 1,
tabPosition: 'bottom',
items: [panel.propertyGrid]
}, {
region: 'west',
stateId: 'navigation-panel',
id: 'west-panel',
title: '车辆列表',
split: true,
width: 200,
minWidth: 175,
maxWidth: 400,
collapsible: true,
animCollapse: true,
margins: '0 0 0 5',
layout: 'accordion',
items: [tree/*, {
title: '区域规划',
html: '<p>Some settings in here.</p>',
iconCls: 'settings'
}, {
title: '在线列表',
html: '<p>Some info in here.</p>',
iconCls: 'info'
}*/]
},
Ext.create('Ext.tab.Panel', {
region: 'center',
deferredRender: false,
activeTab: 0,
items: [gridPanel]
})]
});
三、动态更新
var gridPanel = Ext.create('Ext.grid.Panel', {
store: getLocalStore(),
columns: [
{text: "车牌号码", dataIndex: 'number_plate',locked: true,width:100},
{text: "车台号码", dataIndex: 'call_letter',width:100},
{text: "速度", dataIndex: 'speed',width:50},
{text: "方向", dataIndex: 'cncourse',width:50},
{text: "定位时间", dataIndex: 'gpstime',width:110},
{text: "上报时间", dataIndex: 'stamp',width:110},
{text: "参考位置", dataIndex: 'referenceposition',width:600}
],
collapsible: true,
animCollapse: false,
title: '车辆显示区域',
iconCls: 'icon-grid',
listeners : {
itemdblclick : function(view, record, item, index, e, eOpts) {
var unitid=record.get('call_letter');
//alert('unitid:'+unitid);
//propertyGrid.setSource(record.data);
// 获取propety grid组件
var propGrid = Ext.getCmp('propGrid');
// 保证property grid是存在的
if (propGrid) {
// 获得property grid 的store数据
//propGrid.setSource(record.data);//这一句是可行的,请不要删除
var data={
"车牌号码": record.get('number_plate'),
"车台号码": record.get('call_letter'),
"行驶速度": record.get('speed'),
"行驶方向": record.get('cncourse'),
"所在位置": record.get('referenceposition'),
"定位时间": record.get('gpstime'),
"上报时间": record.get('stamp')
};
propGrid.setSource(data);
}
}
}
});
- Extjs4.1动态更新Ext.grid.PropertyGrid创建的propertyGrid的内容
- 动态可订制属性的 PropertyGrid
- 动态可订制属性的 PropertyGrid
- PropertyGrid控件的使用1
- Extjs4.1向Ext.grid.Panel创建的gridpanel中动态在第一行插入数据
- NET 的 PropertyGrid 控件
- 强大的PropertyGrid
- 探索PropertyGrid的使用
- PropertyGrid控件的学习
- PropertyGrid控件的使用
- 只读的PropertyGrid
- propertygrid easyui 的使用
- propertygrid
- PropertyGrid
- ext中PropertyGrid用法
- PropertyGrid 绑定动态的属性与值的集合
- PropertyGrid 绑定动态的属性与值的集合
- PropertyGrid属性值的汉化
- .NET源代码保护--MAXTOCODE
- Drools学习(三)实例
- 加快vs启动速度
- libminigui-1.6.so.10: ELF file OS ABI invalid
- 如何提高阅读源代码的效率
- Extjs4.1动态更新Ext.grid.PropertyGrid创建的propertyGrid的内容
- asp.net怎么使用事务
- derive_timing_constraints--DC
- linux启动脚本学习
- GoF著作中未提到的设计模式(1): Archetype
- Android 中Message,MessageQueue,Looper,Handler详解+实例
- 提供一个JAVA过滤HTML代码和截取字符串的类(包括测试用例)
- Macromedia FlashPaper 2的安装方法(XP和Win7)
- GoF著作中未提到的设计模式(2):Interceptor