3.2.0

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);
June 28,
Any Help would be appreciated
James
July 3,

This topic is archived.

See also:


Back to support forum