:: Forum >>

Restoring sorting after Refesh

Hi,

After sorting a column and requesting a table again I loose the sorting is there anyway to get around this?

At the moment the Code I am using is:

//load table/grid
var table = new AW.XML.Table;
table.setURL("webservice.asmx/getMonitorSessions");
table.setParameter("GroupID", 1);
table.setRequestMethod("POST");
table.setRows("//NewDataSet/*"); // data rows XPath
table.request();

var grid = new AW.UI.Grid;
grid.setId("grid");
//grid.setHeaderText([]);
grid.setColumnCount(14);
grid.setCellModel(table);
grid.refresh();


//Reload table (request and apply sorting)
window.setInterval(function(){
var sortColumn = grid.getSortColumn();
var sortDirection = grid.getSortDirection(sortColumn);


grid.clearRowModel();
grid.setRowCount(table.getCount());
table.request();


if (sortColumn != -1) {
grid.sort(sortColumn, sortDirection);
}
}, 2000);
Thursday, June 28, 2007
Any Help would be appreciated
James
Tuesday, July 3, 2007

This topic is archived.


Back to support forum

Forum search