:: Forum >>

Change header indices dynamically without grid refresh

I've got multiple headers which are hidden or shown depending on user actions. All works fine with a full obj.refresh but takes ages. Is there any way to just refresh the headers without the whole grid (extended model) ...?

obj.setHeaderCount(x);
obj.setHeaderIndices(h);
obj.refresh();

i.e. what can I replace obj.refresh() with ...?

Thanks.
(a fully paid up customer!!)
Charles Dean
Tuesday, July 24, 2007
The list of header rows is 'top' template and there are three instances (left fixed area, scrolling middle and right fixed) -

obj.getTopTemplate(0).refresh();
obj.getTopTemplate(1).refresh();
obj.getTopTemplate(2).refresh();
Alex (ActiveWidgets)
Tuesday, July 24, 2007
Alex,

Thanks very much for your reply - sadly doesn't seem to work, especially when increasing the number of headers displayed. Reducing does work but leaves a white gap between the headers and the grid.

I think the key problem is that I'm changing the headercount as well - content is always updated fine, it's just when the no. of headers being displayed is changed.

Any thoughts ... or suspect I'll have to use a full grid refresh.

Thanks very much.

Charles.
Charles Dean
Wednesday, July 25, 2007
Unfortunately its more complicated than I thought...

function refresh(){

    obj.getTopTemplate(0).refresh();
    obj.getTopTemplate(1).refresh();
    obj.getTopTemplate(2).refresh();

    obj.raiseEvent("adjustScrollHeight");

    var h = obj.getContentHeight(0) + "px";

    obj.getContentTemplate().getContent("box/top").setStyle("height", h);

    if (AW.ie) {
        obj.getContentTemplate().getContent("box").setStyle("padding-top", h);
    }
    else {
        obj.getContentTemplate().getContent("box/middle").setStyle("top", h);
    }
}
Alex (ActiveWidgets)
Thursday, July 26, 2007
Alex,

Works perfectly - thanks very much for your help.

Have to say an excellent product but as others have said before documentation would be excellent. To be honest would have paid double to get it, simply for the time it would save during development.

As an interim measure - a more advanced search option on the forums would help.

Charles.
Charles Dean
Thursday, July 26, 2007
Hi Alex,

Struggling to make the solution above work in 2.5.1 - the toptemplate refresh does change things but doesn't take into account any re-ordering of header indices, e.g. just shows the first x that were displayed before.

Full grid refresh does work as before.

Thanks

Charles.
Charles Dean
Sunday, March 2, 2008
http://www.activewidgets.com/javascript.forum.22165.1/change-header-indices-dynamically-without.html
Alex (ActiveWidgets)
Monday, March 10, 2008

This topic is archived.


Back to support forum

Forum search