PDA

View Full Version : Refreshing content in a Grid Panel



Rowan
23 Jul 2007, 4:12 AM
I am using grid panel to hold some search results, I need to use this as I cant do all of the resizing etc in a content panel, however I cant seem to be able to refresh the data inside a grid panel, ive tried destroying the region and the gridPanel but even then it just doesnt reload, this was working fine with a content panel but I need the extra features of the grid panel really.

I cant use the refresh statement as im using DWR to get the results to the page - has anyone got an example of being able to reload the DS / Grid in a grid panel?

I just get an empty panel instead of it loading the data, ive done a lot of searching on the forums but cant seem to find anything that is specific to this issue.

I'm on 1.01a

Rowan
23 Jul 2007, 5:46 AM
I've managed to get this working now, I was destroying the grid further up the food chain as it were.

One thing that is still a little annoying though is that when I first initialise the dialogue with a grid the paging tool bar sits neatly on the bottom of the window, however when I refresh the grid it will only sit halfway up the window... No idea why?

Any ideas would be more than appreciated.

Thanks

Rowan
23 Jul 2007, 7:13 AM
Ignore me im being really bloomin stupid today.

What an .

:(

cecol
16 Aug 2007, 3:57 AM
can you give your code!
I want this feature .

tobiu
16 Aug 2007, 4:18 AM
hi rowan,

i am working with gridpanels too and have no problems with it.
if you post some code i might be able to help.



var grid1 = new GridClass('home');
var homeGrid = new Ext.GridPanel(grid1.grid, {handlerContextMenu: LayoutClass.onContextMenu, title: 'Home', fitToFrame: true, closable: false});
layout.add('center', homeGrid);


i use a grid class for constructing grids, then you can work as normal with the grids + ds.

Animal
16 Aug 2007, 4:23 AM
Just use grid.getDataSource().reload()