Extjs学习笔记4-propertyGrid

来源:互联网 发布:考研作息知乎 编辑:程序博客网 时间:2024/04/26 14:27

效果图:



代码

Ext.onReady(function(){Ext.create("Ext.grid.property.Grid",{title:"MyPropertyGrid",width:400,renderTo:Ext.getBody(),source:{"name":"Crossci","Created": Ext.Date.parse('2012-05-15', 'Y-m-d'),"available":true,"age":19,"desc":"good stu"}});});

禁止编辑的方法


mypropertygrid.on("beforeedit",function(e){e.cancel = true;return false;});


获得某一个属性的值:


Ext.Msg.alert("inf",mypropertygrid.store.getById("name").get("value"));




注释:

文件目录结构:

app3.js是js代码

app3.html 是效果展现的地方,其中会引入app3.js