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变更单行记录值【修改】相关推荐

  1. 利用data store在不同模型中传递数据

    说明 这里所说的不同模型,指的是同一个模型中采用Model模块引用的不同模型,而非完全独立的两个模型.例如有一个模型叫main,在main中引用了ref1模型和ref2模型.我这里说的在不同模型中利用 ...

  2. Ext.data.Store 获取Json数据只有一行,而且是最后一行

    这个是js代码,获取的是json数据,使用了reader this.store=new Ext.data.Store({ idProperty: 'itemid', autoLoad:this.aut ...

  3. ext store 数据修改_Ext 修改Store初始化加载完后修改record属性。

    /** * Created by huangbaidong on 2016/9/18. * 产品组件通用Store,*/Ext.define('app.component.ebs.itemdata.P ...

  4. ExtJs之Ext.data.Store

    因为上次用过Ext.data.Store,觉得挺重要的,  故转载了一篇http://blog.csdn.net/davidxj/archive/2009/04/23/4103647.aspx Ext ...

  5. Ext.data.Store介绍

    store是一个为Ext器件提供record对象的存储容器,行为和属性都很象数据表  先看一段代码: var store = new Ext.data.Store({ proxy:new Ext.da ...

  6. [Extjs6]浅谈Ext.data.Store的使用.

    定义model Ext.define('Example.model.Contact', {extend: 'Ext.data.Model',fields: ['id', 'name', 'phone' ...

  7. ExtJS教程(7)---Ext.data.Store中事件的应用

    为了"持之以恒",写的有点草率,随后会修正 上节说了Ext.data.Store的基本用法,以及各种场景该怎么用,这节说项Store的事件的用法 beforeload:在数据加载前 ...

  8. 4.Ext JS Ext.data.Store本地过滤

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/inforstack/article/details/53608732 var myStore = E ...

  9. EXt的数据加载与展示

    工作中接触的系统的前台使用了EXT JS框架,数据加载方式是Ajax异步加载.前后台的数据交互格式是json格式.系统中最主要的数据展示是列表展示.现对上述数据的展示作出如下总结不足之处还望多多指教. ...

最新文章

  1. MD5算法之C#程序
  2. 【 FPGA 】Vivado和ISE设计流程比较(重点是Vivado IDE)
  3. 基于OpenStreetMap计算驾车距离(Java)
  4. DataTabel中关于ImpotRow的一点尝试
  5. ASP.NET MVC升级到ASP.NET Core MVC踩坑小结
  6. C++实现数组模拟链表(实现链表的增删功能)
  7. 逗比学树莓派之GPIO
  8. 【恋上数据结构】贪心(最优装载、零钱兑换、0-1背包)、分治(最大连续子序列和、大数乘法)
  9. 鸟哥的Linux私房菜-基础篇(第九章)
  10. python打开excel执行vba代码_“Python替代Excel Vba”系列(终):vba中调用Python
  11. DosBox与IDA DosBox的编译及使用
  12. RK平台 MPP 与RGA ,解码h265绿屏,花屏解决方法
  13. TransactionScope使用(二)——msdtc不可用
  14. 解决问题:import torch失败和torch.cuda.is_available()返回false
  15. SQL Server无法连接到本地数据库
  16. CEF Extensions
  17. java简易计算机(用栈实现中缀转后缀,计算后缀表达式)
  18. 获取url地址后面参数的2种方法(小程序二维码跳转参数解析)
  19. CTF平台题库writeup(四)--BugKuCTF-代码审计(14题详解)
  20. 名编辑电子杂志大师教程 | 从模板新建文件

热门文章

  1. javax.crypto.IllegalBlockSizeException: Input length not multiple of 8 bytes
  2. 用perl语言求1到100之间的偶数,奇数及素数
  3. 漢城博殺的日子 (一)
  4. 为什么C语言还是被很多人说成过时了?
  5. 新图表请查收!看够了炫酷大屏,这次来点小清新风格!
  6. 云服务已一步一步“入侵”我们生活
  7. 【转】非常道-中小软件公司项目管理
  8. 多媒体技术基础及应用
  9. 商业智能常见名词浅释(转载)
  10. 中国程序员的前景并非一片黑暗,教你如何拥有光明的前程