ext store 数据修改_extjs 之Ext.data.Store变更单行记录值【修改】
1.record声明如下
machineuse_record = Ext.data.Record.create([{
name : 'id',
type : 'int'
}, {
name : 'projectname',
type : 'string'
}, {
name : 'projectid',
type : 'int'
}, {
name : 'ip',
type : 'string'
}, {
name : 'server',
type : 'string'
}]);
2.datastor声明如下
machineuse_list_grid_store = new Ext.data.Store({
proxy : new Ext.data.HttpProxy({
url : 'GetMachineUseList',
method : 'POST'
}),
reader : new Ext.data.JsonReader({
root : "root",
id : 'machineuse_list_grid_store',
totalProperty : 'totalCount'
}, machineuse_record)
});
3. grid声明如下
machineuse_list_grid = new Ext.grid.GridPanel({
store : machineuse_list_grid_store,
animate : true,
columnLines : true,
region : 'south',
height :Glb.outer_center.getHeight() * 0.63,
tbar : [p_buttons],
split : true,
autoScroll:true,
columns : [{
id : 'id',
header : "id",
width : 60,
sortable : true,
dataIndex : 'id'
}, {
id : 'ip',
header : "机器ip",
width : 120,
sortable : true,
dataIndex : 'ip'
}, {
id : 'server',
header : "部署服务",
width : 80,
sortable : true,
dataIndex : 'server'
}, {
id : 'projectname',
header : "项目",
width : 120,
sortable : true,
dataIndex : 'projectname'
},
{
id : 'projectid',
header : "项目id",
width : 120,
sortable : true,
dataIndex : 'projectid',
hidden: true
}],
region : 'south',
bbar : new Ext.PagingToolbar({
pageSize : 10,
store : machineuse_list_grid_store,
displayInfo : true,
displayMsg : '显示 {0} - {1} /共 {2}条记录',
emptyMsg : "没有记录"
})
});
4. 通过修改datastore记录来修改grid某行的值
var rec = machineuse_list_grid_store.getAt(g_machine_rowIndex);
rec.set('ip', ip);
rec.set('server', env);
rec.set('projectid', owner);
rec.set('projectname', owner);
rec.commit();
ext store 数据修改_extjs 之Ext.data.Store变更单行记录值【修改】相关推荐
- 利用data store在不同模型中传递数据
说明 这里所说的不同模型,指的是同一个模型中采用Model模块引用的不同模型,而非完全独立的两个模型.例如有一个模型叫main,在main中引用了ref1模型和ref2模型.我这里说的在不同模型中利用 ...
- Ext.data.Store 获取Json数据只有一行,而且是最后一行
这个是js代码,获取的是json数据,使用了reader this.store=new Ext.data.Store({ idProperty: 'itemid', autoLoad:this.aut ...
- ext store 数据修改_Ext 修改Store初始化加载完后修改record属性。
/** * Created by huangbaidong on 2016/9/18. * 产品组件通用Store,*/Ext.define('app.component.ebs.itemdata.P ...
- ExtJs之Ext.data.Store
因为上次用过Ext.data.Store,觉得挺重要的, 故转载了一篇http://blog.csdn.net/davidxj/archive/2009/04/23/4103647.aspx Ext ...
- Ext.data.Store介绍
store是一个为Ext器件提供record对象的存储容器,行为和属性都很象数据表 先看一段代码: var store = new Ext.data.Store({ proxy:new Ext.da ...
- [Extjs6]浅谈Ext.data.Store的使用.
定义model Ext.define('Example.model.Contact', {extend: 'Ext.data.Model',fields: ['id', 'name', 'phone' ...
- ExtJS教程(7)---Ext.data.Store中事件的应用
为了"持之以恒",写的有点草率,随后会修正 上节说了Ext.data.Store的基本用法,以及各种场景该怎么用,这节说项Store的事件的用法 beforeload:在数据加载前 ...
- 4.Ext JS Ext.data.Store本地过滤
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/inforstack/article/details/53608732 var myStore = E ...
- EXt的数据加载与展示
工作中接触的系统的前台使用了EXT JS框架,数据加载方式是Ajax异步加载.前后台的数据交互格式是json格式.系统中最主要的数据展示是列表展示.现对上述数据的展示作出如下总结不足之处还望多多指教. ...
最新文章
- MD5算法之C#程序
- 【 FPGA 】Vivado和ISE设计流程比较(重点是Vivado IDE)
- 基于OpenStreetMap计算驾车距离(Java)
- DataTabel中关于ImpotRow的一点尝试
- ASP.NET MVC升级到ASP.NET Core MVC踩坑小结
- C++实现数组模拟链表(实现链表的增删功能)
- 逗比学树莓派之GPIO
- 【恋上数据结构】贪心(最优装载、零钱兑换、0-1背包)、分治(最大连续子序列和、大数乘法)
- 鸟哥的Linux私房菜-基础篇(第九章)
- python打开excel执行vba代码_“Python替代Excel Vba”系列(终):vba中调用Python
- DosBox与IDA DosBox的编译及使用
- RK平台 MPP 与RGA ,解码h265绿屏,花屏解决方法
- TransactionScope使用(二)——msdtc不可用
- 解决问题:import torch失败和torch.cuda.is_available()返回false
- SQL Server无法连接到本地数据库
- CEF Extensions
- java简易计算机(用栈实现中缀转后缀,计算后缀表达式)
- 获取url地址后面参数的2种方法(小程序二维码跳转参数解析)
- CTF平台题库writeup(四)--BugKuCTF-代码审计(14题详解)
- 名编辑电子杂志大师教程 | 从模板新建文件