PDA

View Full Version : Help with binding xml boolean value to a checkbox



vaishalishah
18 Feb 2010, 4:06 AM
Hi,
I have an xml of which one of the tags is true..i need to bind this value implicitly to an EditorGridPanel where my editor is a checkbox..so that when the screen load i can see this as automatically checked or unchecked..one of the examples i saw was using a plugin from the examples directory....<script type="text/javascript" src="ext-3.0.0/examples/ux/CheckColumn.js">

i dont want to follow this approach how can i manually do this..
snippet of my code is as follows:
______________________________________________________________________
this is the store

var store = new Ext.data.Store({
url: 'http://www.extjs.com/deploy/dev/examples/grid/plants.xml',
reader:new Ext.data.XmlReader(
{record:'plant'},
[
{name: 'common', type: 'string'},
{name: 'botanical', type: 'string'},
{name: 'light'},
{name: 'price', type: 'float'},
// dates can be automatically converted by specifying dateFormat
{name: 'availDate', mapping: 'availability', type: 'date', dateFormat: 'm/d/Y'},
{name: 'indoor', type: 'bool'}
]
)
});

___________________________________________

this is the one of the columns editor grid panel..do i need to use a renderer..and if so how do i go about this.

{
header:'Indoor',
dataIndex:'indoor',
editor:new Ext.form.Checkbox({
id:'myCheck6'
})//,
/*renderer:myFunc6*/
}