PDA

View Full Version : problem to loada data in a tree drid XML



cberrios
12 Apr 2010, 7:50 AM
Hello my name is Cristian and im an new with extjs, y have look a tree grid and need load data from a xml i have store the data so


var store = var store = new Ext.data.Store({
// load using HTTP

url: 'http://localhost//ppi/aspx/navigation.aspx?page=obtener_programacion_base_centrocosto&id_tipo_linea=1&id_periodo_programacion=4&id_centro_costo_actual=' + idCentroCosto + '&tipo_moneda=miles&codigo=\'00\'&radio_modalidad=&servicio=',

// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({record: 'linea_presupuestaria', id: '_id'
}, [
{name: '_id', type:'int'},
{name: 'codigo'},
{name: 'nombre'},
{name: 'presupuesto_marco', type:'int'},
{name: 'presupuesto_2', type:'int'},
{name: 'presupuesto_3', type:'int'},
{name: 'presupuesto_4', type:'int'},
{name: 'presupuesto_5', type:'int'},
{name: 'presupuesto_6', type:'int'},
{name: 'presupuesto_7', type:'int'},
{name: 'presupuesto_8', type:'int'},
{name: 'presupuesto_9', type:'int'},
{name: 'presupuesto_10', type:'int'},
{name: 'presupuesto_11', type:'int'},
{name: 'presupuesto_12', type:'int'},
{name: 'presupuesto_13', type:'int'},
{name: 'monto_total', type:'float'},
{name: '_parent', type:'auto'},
{name: '_is_leaf', type:'bool'},
{name: 'validar', type:'bool'},
{name: 'modalidad', type:'string'},
{name: 'diferencia', type:'float'},
{name: 'porcentaje_uso', type:'float'},
{name: 'editable', type:'bool'}]);

ven i load the data de grid show not wat make y bad help plis.

another question y have a grid with childrens node and the childrens node have childerns how can y make to load childres ven y need in a tree grid when. pliss help

chrizmaster
16 Apr 2010, 12:16 AM
lol?
1) wrong forum
2) seems like you need to learn the basics first (as we all did) ==> http://www.extjs.com/learn/Tutorials
Christian