3.2.0

Change Header Indices dynamically without full refresh

Hi Alex,

You provided a solution for v2 but sadly doesn't work in v2.5.1. I'm changing the header indices and header count once the grid is loaded and want to avoid a full grid refresh.

Refreshing the three topTemplates doesn't help, and refreshing each header individually doesn't work either.

Any help much appreciated.

Thanks

Charles.
Charles Dean
March 10,
This code should work with v2.5.1 -

obj.getTopTemplate("left").refresh(); 
obj.getTopTemplate("center").refresh();


full sample

var obj = new AW.Grid.Extended;
obj.setCellData(function(col, row){return col + "." + row});
obj.setHeaderText("header");

obj.setColumnCount(10);
obj.setRowCount(10);

obj.setHeaderCount(2);
obj.setHeaderIndices([0, 1]);

document.write(obj);


var button = new AW.UI.Button;
button.onClick = function(){
    obj.setHeaderCount(3);
    obj.setHeaderIndices([0, 1, 2]);
    obj.getTopTemplate("left").refresh(); // fixed left headers
    obj.getTopTemplate("center").refresh(); // scrolling center headers
}
document.write(button);
Alex (ActiveWidgets)
March 10,
Alex,

Thanks very much for your help. Works perfectly.

If you had a chance to look at my combo scroll events issue at some point (posted 2 mar) I'd be even more grateful :)

Cheers

Charles.
Charles Dean
March 10,

This topic is archived.

See also:


Back to support forum