3.0.0

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
July 24,
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)
July 24,
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
July 25,
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)
July 26,
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
July 26,
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
March 2,
Alex (ActiveWidgets)
March 10,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.