Replacing data in grid issue
Has anyone ever replaced the data in the grid only to not see it displayed? I have a scenario down that seems to fail every time. If I have a grid with 1000 records and scroll down a few hundred rows, then reload the data with a set that only contains 10 rows, the data does not display. I can go from the 1000 row data set to the 10 row data set with no problems if I don't scroll down the grid. Here is the code I am using to replace the data:
I tried to call clear() before loading the data but doing so causes the mouse events to stop working. The calls to setSelectedRows and setCurrentRow were added to try and clear up the problem with failed results.
Any thoughts would be appreciated.
var cols = loadDoc('getDispatchHeader.htt?target=' + toolID);
cols = eval(unescape(cols));
var data = loadDoc('getDispatchData.htt?target=' + toolID);
data = eval(data);
this.Grid.setCellText(function(c,r){return unescape(data[r][c])});
this.Grid.setRowCount(data.length);
this.Grid.setHeaderText(cols);
this.Grid.setColumnCount(cols.length);
this.Grid.setSelectedRows([]);
this.Grid.setCurrentRow(0);
this.Grid.refresh();
I tried to call clear() before loading the data but doing so causes the mouse events to stop working. The calls to setSelectedRows and setCurrentRow were added to try and clear up the problem with failed results.
Any thoughts would be appreciated.
Jim Hunter (www.FriendsOfAW.com)
April 11,