obj.setRowHeaderWidth() do not work when reset.
I load data from XML, and can't get the obj.setRowHeaderWidth to set the width for the row headers. It works great if done before grid is written, but not if done when I recieve the XML-data. Any known fix?
This gets called in the _response:
This gets called in the _response:
function setRowHeaders(grid, xml) {
var rowTextXpath = "//@header";
var hNodes = xml.selectNodes(rowTextXpath);
var maxWidth = 0;
if (hNodes) {
for (i = 0; i < hNodes.length; i++) {
grid.setRowText(hNodes[i].text, i);
width = grid.getRowTemplate(i).element().firstChild.scrollWidth;
if (maxWidth < width) {
maxWidth = width;
}
}
grid.setRowHeaderWidth(maxWidth);
grid.refresh();
alert("MaxWidth: " + maxWidth); // == 143, which seems correct.
}
}
MattiasF
January 19,