PDA

View Full Version : 2 Property Grids accordianed



gokujames
6 Sep 2010, 9:41 PM
Hi i would like to put 2 propertygrid in accordian format in eastern region , my current code is this


{
title: 'Properties',
region: 'east',
layout:{type:'accordian',animate:true},
items:[{Ext.grid.PropertyGrid({id:'prop'}),
Ext.grid.PropertyGrid({id:'evt'})
}],
width:200,
collapsible:true,
margins: '5 5 0 0'
}

which obviously throws error missing ' ; ' in the items line
also is it possible to do a layout like this in the east region
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.1/CLR3.5/html/images/WebHtmlEditor_Improving_WebHtmlEditor_Performance_01.png

where clicking on the Lightning button will bring another properties box etc

Condor
6 Sep 2010, 10:47 PM
It's:

items:[
new Ext.grid.PropertyGrid({id:'prop', ...}),
new Ext.grid.PropertyGrid({id:'evt', ...})
],

gokujames
6 Sep 2010, 10:59 PM
thank you again condor :D
this code that set's attributes of element as DataSource for PropertyGrid, returns differently for Firefox , Ie why is this ?


//DATA SOURCE DEFINER
function dSource(objId){
source={};
var attrs = Ext.getDom(objId).attributes;
for (var i = 0; i < attrs.length; i++)
{
source[attrs[i].name] = attrs[i].value;
}
Ext.getCmp('prop').setSource(source);
}