3.0 beta 2

Re-sorting after insert rows and refresh

Hi,

I have a problem with the sorting order after refresh the table and insert rows to the grid. The sorting is to sort by millisecond in the column 8. I am using the activeWidgets version 1.0. Please super hero can help me.

Urgent!!

1) The Rows is added sometimes. But sometimes it doesn't work.
2) The order is not right in some rows.

function addRow(nRows, nColumns, responseXMlObj, tagName){
var newRows = new Array();

if(nRows > 0){
for(var i = 0; i < nRows; i++){
var rowData = new Array();
for(var j = 0; j < nColumns; j++){
rowData[j] = responseXMlObj.getElementsByTagName(tagName)[i].childNodes[j].firstChild.data;
}
newRows.unshift(rowData);
}

// Add an extra row
while(newRows.length > 0){
myData.unshift(newRows.shift());
}

if(myData.length > <%=PageSize%>){
myData.splice(<%=PageSize%>);
}

obj.setRowProperty("count", myData.length);

obj.setDataProperty("value", function(i, j){ return (j==0) ? myData[i][1*j+8] : myData[i][j] } ); // for sorting

// refresh the grid
obj.refresh();
}
}

Thanks a lot.
flashsnake
July 6,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.