Alex, please clarify
There are many threads in this forum mentioning the behaviour when using JS array as data source: if you sort on any column and then change the data in the array, grid basically crashes.
I understand this is not regarded as bug, but those of us who use JS arrays and need to change the data still need the workaround.
Sudhaker Raj suggested one in this thread: javascript.forum.1788.24/bug-caused-by-sorting.html
but admitted that it's not "working right all the time". It seem to work for me, but I haven't given it thorough testing.
I'd be much more confortable if "official" workaround from Alex was posted or if he approved Sudhaker's workaround. Please?
Thanks much everybody,
I understand this is not regarded as bug, but those of us who use JS arrays and need to change the data still need the workaround.
Sudhaker Raj suggested one in this thread: javascript.forum.1788.24/bug-caused-by-sorting.html
function resetRowValues() {
// re-initialize the data count
obj.setDataProperty("count", myData.length);
// @@@ I GET THIS ZERO FOR TABLE MODEL
var newCount = obj.getDataProperty("count");
var rowValues = [];
for(var i=0; i < newCount; ++i) { rowValues.push(i); }
obj.setRowProperty("values", rowValues);
obj.setSortProperty("index", null);
}
but admitted that it's not "working right all the time". It seem to work for me, but I haven't given it thorough testing.
I'd be much more confortable if "official" workaround from Alex was posted or if he approved Sudhaker's workaround. Please?
Thanks much everybody,
Sergei
May 31,