View Full Version : problem with gridPanel

7 Aug 2009, 11:11 PM
Hi! I have a problem with an grid, I can't see all the results of the query.
This grid is framed with checkbox selection, I think that the problem is in the declaration of the gridPanel, because I see the data correctly in the firebug, but in the grid not all the results are showed.If someone know how to fix it, answer me please, because I am losing so much time with this issue. Grettings.
The code is as follows:
var data= new Ext.data.Store({
id: 'ChartDataStore',
proxy: new Ext.data.HttpProxy({
url: 'chart2.php',
method: 'POST'
baseParams:{task: "GRID", a:firstdate, b:c}, // this parameter is passed for any HTTP request
reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'total',
id: 'id'
{name: 'id_ad',readOnly: true, type: 'int', mapping: 'id_ad'},
{name: 'name', type: 'string', mapping: 'name'},
{name: 'click_count', type: 'int', mapping: 'click_count'},
{name: 'creation_time ', type: 'date', mapping: 'creation_time'},
{name: 'click_limit', type: 'int', mapping: 'click_limit'},
{name: 'direct_link', type: 'string', mapping: 'direct_link'},
{name: 'name_keyw ', type: 'string', mapping: 'name_keyw'},
{name: 'name_tag ', type: 'string', mapping: 'name_tag'}
sortInfo:{field: 'id_ad', direction: "ASC"}
var sm = new xg.CheckboxSelectionModel();
var grid2 = new xg.GridPanel({
store: data,
cm: new xg.ColumnModel({
defaults: {
width: 120,
sortable: true
columns: [
{id:'id_ad',header: "id_ad", width: 20, sortable: true, dataIndex: 'id_ad'},
{header: "name", width: 200, sortable: true, dataIndex: 'name'},
{header: "click_count",sortable: true, dataIndex: 'click_count'},
{header: "creation_time", dataIndex: 'creation_time'},
{header: "click_limit", dataIndex: 'click_limit'},
{header: "direct_link", dataIndex: 'direct_link'},
{header: "name_keyw", width: 100, dataIndex: 'name_keyw', sortable: true},
{header: "name_tag", width: 100, sortable: true, dataIndex: 'name_tag'}
sm: sm,
columnLines: true,
title:'Framed with Checkbox Selection and Horizontal Scrolling',
renderTo: 'grid'

I can't see in the grid click_limit, name_keyw and name_tag results, and I can see the results correctly in firebug as I said before.

7 Aug 2009, 11:32 PM
Some rows are randomly missing????

7 Aug 2009, 11:46 PM
No, the problem is specifically with these rows (creation_time(date), name_keyw, and name_tag), independent of the order in which they are.

7 Aug 2009, 11:54 PM
Those columns?

And what exactly is the problem? Show a screenhot (NOT a forum attachment, a photobucket image), and show the returned JSON as captured from Firebug.

8 Aug 2009, 12:33 AM
sorry, I meant columns not rows. In the folow link you can see that I said


8 Aug 2009, 12:59 AM
How do I know what you want?

What is the actual problem you are facing?

8 Aug 2009, 1:05 AM
My problem is that I can not see in the grid all the Json results, the grid does not show data in the columns creation_time, name_keyw and name_tag

8 Aug 2009, 1:18 AM
You have named those fields with a space at the end! So the ColumnModel is looking for the wrong name.

8 Aug 2009, 1:27 AM
Thankyou so much Animal, works perfect!! and forgive me for waste a little your time, the error was a nonsense, I have to learn so much.