PDA

View Full Version : Loading data on grid



Sneha004
4 Mar 2012, 10:43 PM
Hi,,

I am facing problem on loading data on grid.
When I run my application ,the data on first tab is loading.
When I click on second tab and then by clicking on first tab the loaded data has disappeared.

Is there any thing I have missed when declaring the grid?

Please solve my problem .....:(

chramer
4 Mar 2012, 11:03 PM
just post some code!

Sneha004
5 Mar 2012, 12:42 AM
{
xtype : 'gridpanel',
id : 'gridId',
width : '100%',
height : 30,
enableColumnHide : false,
sortableColumns : true,
autoScroll : true,
plugins : [ Ext.create('Ext.ux.grid.GridHeaderFilters') ],
viewConfig : {
id : 'ds',
trackOver : false,
stripeRows : true
},
columns : [{
header : 'First Name',
width : 100,
dataIndex : 'firstName',

}, {
header : 'Last Name',
width : 100,
dataIndex : 'lastName',

}],
store : 'driver.DriverDetails'
}

This is the grid which shows first name and last name of driver when I click on first tab.
But when I click on second tab and again I click on first tab the data is not loaded to grid.
It is displaying grid with empty data.

Please give some solution as soon as possible.........

Farish
5 Mar 2012, 12:48 AM
Dont use extra commas. Firefox accepts them but IE will cause an error:


dataIndex : 'lastName',

Also post code for your tabpanel and please use CODE tages (# button when you are typing your message)

Sneha004
5 Mar 2012, 12:55 AM
Yes,

This one is type mistake .

I'll not do such silly mistake.
Can you give me the solution?

Farish
5 Mar 2012, 12:57 AM
From the grid code, I wasnt able to find any problem. Post your whole code (tabpanel and whats in the other tab).