![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
10/05/2011, 11:32
|
| | Fecha de Ingreso: abril-2010 Ubicación: Lima-Peru
Mensajes: 96
Antigüedad: 14 años, 9 meses Puntos: 2 | |
Respuesta: Cargar timeField desde Grid Hola , Gracias por Reponder aka te dejo el codigo
Mi store y Grid
Código:
var store = new Ext.data.JsonStore({
url:this.url,root:'data',
fields:['nro,'Fecha_Inicio','Fecha_Fin','vnomEstablecimiento',
'vobservacion','Fecha_Tramite','IMPRESION','Hora_Inicio']
});
var Grid= new Ext.grid.GridPanel({
id:'idgrid',
store:store,
columns:[
{header:'Nro Autorizacion.',dataIndex:'nro',width:100},
{header:'Fecha Inicio Evento',dataIndex:'Fecha_Inicio',width:100},
{header:'Fecha Fin Evento',dataIndex:'Fecha_Fin',width:100},
{header:'NombreEstablecimiento',dataIndex:'vnomEstablecimiento',width:200},
{header:'Observacion',dataIndex:'vobservacion',width:100},
{header:'Fecha de Tramite',dataIndex:'Fecha_Tramite',width:100},
{header:'ESTADO DE IMPRESION',dataIndex:'IMPRESION',width:150}
{header:'Hora',dataIndex:'Hora_Inicio',width:150}
],
footer:false,
border: false,
anchor:'99%',
height:175,
columnLines:true
});
mi Campo TimeField que esta en la ventana:
Código:
xtype:'timefield',
id:'HoraInicio',
minValue: '12:00 AM',
maxValue: '23:59 PM',
increment: 1,
fieldLabel:'Hora Inicio',
width:100
y aka es donde intento llamarlo:
Código:
var rows= Ext.getCmp('gridAut').getSelectionModel().getSelections();
Ext.getCmp('FechaInicio').setValue(rows[0].get('Fecha_Evento');
Ext.getCmp('FechaInicio').setValue(rows[0].get('Fecha_Inicio'));
Ext.getCmp('HoraInicio').setValue(rows[0].get('Hora_Inicio'));
Ext.getCmp('fechafin').setValue(rows[0].get('Fecha_Fin')); Ext.getCmp('nombreestab').setValue(rows[0].get('vnomEstablecimiento'));
Ext.getCmp('Estado').setValue(rows[0].get('IMPRESION'));
todos los campos me muestran correctamente solo el campo TimeField me sale en blanco. gracias |