效果图:
代码
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