效果图:

代码
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
本文记录了ExtJS中PropertyGrid组件的使用,通过代码示例展示了如何获取属性值。提供了详细的文件目录结构,包括app3.js作为JS代码实现和app3.html用于展示效果。
216

被折叠的 条评论
为什么被折叠?



