3.2.0

Reloading Data After Sorting

I'm having a problem reloading data. Things go as expected as long as I don't sort. But after sorting on any column the grid is thereafter limited to the number of rows at the time of sorting. If I refill the array with the same number, or more, of rows I get the original array's number of rows. If I refill with fewer rows I get "[object]" in the place of the grid.

It seems like the number of rows is getting stuck in the control somewhere when I sort despite resetting the row count in code.
function grdRefresh(grid, array){
  grid.refresh();
  grid.setColumnProperty("count", array[0].length-2);
  grid.setColumnProperty("text", function(j){return array[0][Number(j)+2];});
  grid.setColumnHeaderHeight("21px");

  grid.setRowProperty("count", array.length-1);
  grid.setRowProperty("text", function(i){return array[Number(i)+1][0];});
  grid.setRowHeaderWidth("230px");

  grid.getLayoutTemplate().setContent("corner/box/item", Corner);

  grid.setDataProperty("text", function(i,j){return array[Number(i)+1][Number(j)+2]});
  grid.refresh();
  document.getElementById("srchResults").innerHTML = grid;//alert(grid.getScrollTemplate());
}
Dav
April 21,
Sorry. Sorry!
I swear I looked around in the forum but I didn't find 'Bug Caused by sorting?' until after I posted. In any event the solution there worked for me. Thanks!
Dav
April 21,

This topic is archived.

See also:


Back to support forum