PDA

View Full Version : dettach and re-attach widget



mike b
7 Jan 2011, 1:44 PM
I have a Grid that uses a GridCellRenderer to put a ProgressBar into the Grid.

Also, we use the GroupingView so that the users can apply groups.

The Grid might have as many as 200 rows in it.

I have noticed that when the GroupingStore does a groupBy, it really re-renders the entire grid. Thus, it re-creates the widgets returned from the GridCellRenderer. The same case for simple sorting.

This seems to be extremely time consuming in our case (like 30 seconds or more).

So, I tried to implement a cache of the previously rendered ProgressBars and supply those to the Grid.

However, they do not display because they have previous been rendered. The Component class sets its protected variable "rendered" and the BoxComponent class sets its private variable "boxReady" while rendering.

So, if I try to re-attach the object, it throws exceptions.

Is there any way around this?

Can the Grid doing the grouping operation without throwing everything away?

Thanks,
Mike

sven
7 Jan 2011, 5:48 PM
Can the Grid doing the grouping operation without throwing everything away?
The default GroupingView cannot do this. It always is doing a full refresh on a groupBy.