PDA

View Full Version : Dynamically rebuild and restructure a grid



Arkilus
13 Jul 2007, 5:28 PM
Searching at forum ive found this topic: http://extjs.com/forum/showthread.php?t=671
Ive got the same problem described there, but since it is 8 months old, i think that maybe the current Ext version already fixed this problem?

ps: I already tried to use grid.destroy() and after that rebuild, but it brings other errors.

tryanDLS
14 Jul 2007, 6:18 AM
If you just want to use a different datasource/colModel, you can call reconfigure. It's not in the docs yet, but it's discussed in several threads.

Arkilus
14 Jul 2007, 8:55 AM
Thanks very much! This method solved all my problems.

Arkilus
14 Jul 2007, 10:13 AM
EDIT: Problem solved with paging.unbind(oldDs) / paging.ds = newDs / paging.bind(newDs)

Well, the reconfigure() method solved the cm/ds problem at grid, but im still having problems with the paging toolbar attached to it.
I tried to use paging.unbind(oldDs) and paging.bind(newDs), but it is not working.

Arkilus
14 Jul 2007, 6:44 PM
New bug found:
After calling reconfigure() on a grid, the LoadMask funcionality stops to work...

manugoel2003
15 Jul 2007, 12:51 PM
New bug found:
After calling reconfigure() on a grid, the LoadMask funcionality stops to work...

I am facing the same issue

rakesh
18 Aug 2007, 3:48 AM
Hey I am facing the same issue, anybody found solution??

ktp
8 Oct 2007, 5:24 AM
Hi there,

I've got the same issue.
Calling reconfigure() on grid leaves me without loadmask,
calling it again with the initial parameters (ds, cm)
restores the loadmask functionality.

Here is my code:


function accGridBtnSwitch_handler(mode)
{
if (mode == 'user')
{
accGridPagingbar.unbind(group_ds);
accGrid.reconfigure(user_ds, user_cm);
accGridPagingbar.bind(user_ds);
}
else
{
accGridPagingbar.unbind(user_ds);
accGrid.reconfigure(group_ds, group_cm);
accGridPagingbar.bind(group_ds);
}
}
I started a new thread in the help section a few weeks ago but didn't receive any advice.

FritFrut
31 Oct 2007, 2:59 AM
Try this
http://extjs.com/forum/showthread.php?p=80184#post80184
and see if it helps

HTH, Tom