Table doesn't refresh automatically after deleteRow
Using AW 2.6.0 w/ FF 15.0.1 and Chrome 21.0.1180.89
I have the following code which calls deleteRow on obj which is global instance of AW.Grid.Extended. I remember this code working without any issues before upgrading to 2.6.0. Now the problem is sometimes the grid doesn't refresh automatically after deleteRow has been called i.e., the deleted rows are still shown in the grid; one has to reload the entire page or sort on a column to force the deleted rows to disappear. Is this a possible bug in AW 2.6.0 or do I have to call some other function to refresh the grid? In the past I have noticed grid refresh taking a long time for 10,000 records or so.
I have the following code which calls deleteRow on obj which is global instance of AW.Grid.Extended. I remember this code working without any issues before upgrading to 2.6.0. Now the problem is sometimes the grid doesn't refresh automatically after deleteRow has been called i.e., the deleted rows are still shown in the grid; one has to reload the entire page or sort on a column to force the deleted rows to disappear. Is this a possible bug in AW 2.6.0 or do I have to call some other function to refresh the grid? In the past I have noticed grid refresh taking a long time for 10,000 records or so.
<!-- ActiveWidgets post-processing after index is deleted -->
<script type="text/javascript">
<% if @indexes_deleted && !@indexes_deleted.empty? -%>
indexes_deleted_csv = '<%= @indexes_deleted.join(",") -%>';
var indexes_deleted = indexes_deleted_csv.split(',');
var index = '<%= params[:index] -%>';
var row_to_delete = []
var row_indexes = obj.getRowIndices();
if( indexes_deleted && indexes_deleted.length > 0 && obj && index && (index.length > 0)) {
var j;
for(j=0; j<obj.getRowCount(); j++) {
indexes_deleted.every(function(i){
var key = obj.getCellText(selectorValueColumnIndex,row_indexes[j]).unescapeHTML();
if( selectorValueColumnIndex > 1) {
if( key == (i+'+'+index)) {
row_to_delete.push(row_indexes[j]);
}
} else {
if( key == index) {
row_to_delete.push(row_indexes[j]);
}
}
return true;
});
}
//alert('rows_to_delete = ' + row_to_delete);
row_to_delete.every(function(i){obj.deleteRow(i);return true;});
obj.setSelectedRows([]);
obj.setCurrentRow(-1);
}
<% end -%>
</script>
svhyd
September 19,