franzisk
3 Aug 2007, 4:25 AM
I have this Grid beeing rendered in a body of a BasicDialog, the problem is that it's showing only one the second *record* in the DataStore.
What am I doing wrong?
I have lots of other grids working fine.
Anything related to the BasicDialog?
Codes...
dlgProfileHistory.body.dom.innerHTML='<div id="tb-history"></div><div id="grid-history"></div>';
var height = dlgProfileHistory.getEl().getHeight()-55;
Ext.get('grid-history').applyStyles({
border:'1px solid #99bbe8',
overflow:'hidden',
height: height+'px'
});
The grid:
var gridHistory = new Ext.grid.Grid('grid-history',{
ds: dsHistory,
cm: columnModelHistory,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
loadMask: true,
autoSizeColumns: false,
enableColumnMove: true,
enableRowHeightSync: true
});
gridHistory.render();
Json returned in the DataStore:
{"totalCount":"2", "data":[{id:"63838",username:"curisco",history:"Este usuário é tão lindo e gostoso
que não sabemos nem o que fazer com ele.<br>Onde ele vai as bichas fala \'ai que pliso, ai que lindo\', coisa de louco mesmo.<br>Pronto isso é um histórico de 3 linhas.<br>",date_history:"2007-08-02
16:49:17",operator:"FRANCISCO VIEIRA"},{id:"63838",username:"curisco",history:"Este usuário fez anivers
ário no dia <font color=\'#ff0000\' size=\'4\'><b>1o. de agosto</b></font> e ninguém lembrou!!!!<br
>Também esse pessoal só pensa em problema problema problema o tempo todo.<br>",date_history:"2007-08-03
08:10:12",operator:"FRANCISCO VIEIRA"}]}
What am I doing wrong?
I have lots of other grids working fine.
Anything related to the BasicDialog?
Codes...
dlgProfileHistory.body.dom.innerHTML='<div id="tb-history"></div><div id="grid-history"></div>';
var height = dlgProfileHistory.getEl().getHeight()-55;
Ext.get('grid-history').applyStyles({
border:'1px solid #99bbe8',
overflow:'hidden',
height: height+'px'
});
The grid:
var gridHistory = new Ext.grid.Grid('grid-history',{
ds: dsHistory,
cm: columnModelHistory,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
loadMask: true,
autoSizeColumns: false,
enableColumnMove: true,
enableRowHeightSync: true
});
gridHistory.render();
Json returned in the DataStore:
{"totalCount":"2", "data":[{id:"63838",username:"curisco",history:"Este usuário é tão lindo e gostoso
que não sabemos nem o que fazer com ele.<br>Onde ele vai as bichas fala \'ai que pliso, ai que lindo\', coisa de louco mesmo.<br>Pronto isso é um histórico de 3 linhas.<br>",date_history:"2007-08-02
16:49:17",operator:"FRANCISCO VIEIRA"},{id:"63838",username:"curisco",history:"Este usuário fez anivers
ário no dia <font color=\'#ff0000\' size=\'4\'><b>1o. de agosto</b></font> e ninguém lembrou!!!!<br
>Também esse pessoal só pensa em problema problema problema o tempo todo.<br>",date_history:"2007-08-03
08:10:12",operator:"FRANCISCO VIEIRA"}]}