This is with Smartgwtpro 2.3
Firefox 3.6.8 and Chrome 5.0.375.127
I am feeding a listgrid with a date object, and then telling the listgrid to sort by date. It successfully sorts by date, but always sorts it ascending, even though the little arrow indicates descending order.
http://grab.by/63CO
If you click the header and resort descending it sorts the correct way. I have also tried to just call a sort which also didn't work.
Am I making a mistake somewhere, or is there a bug?
Code
The request
Response
the DS file
Firefox 3.6.8 and Chrome 5.0.375.127
I am feeding a listgrid with a date object, and then telling the listgrid to sort by date. It successfully sorts by date, but always sorts it ascending, even though the little arrow indicates descending order.
http://grab.by/63CO
If you click the header and resort descending it sorts the correct way. I have also tried to just call a sort which also didn't work.
Am I making a mistake somewhere, or is there a bug?
Code
Code:
notificationGrid = new ListGrid();
notificationGrid.setAutoFetchData(false);
notificationDS = DataSource.get("notification");
notificationGrid.setDataSource(notificationDS);
notificationGrid.setSortField("modification_date");
notificationGrid.setSortDirection(SortDirection.DESCENDING);
notificationGrid.fetchData();
Code:
{
"actionURL":"http://127.0.0.1:8888/program/sc/IDACall",
"showPrompt":true,
"prompt":"Finding Records that match your criteria...",
"transport":"xmlHttpRequest",
"promptStyle":"dialog",
"bypassCache":true,
"data":{
"criteria":{
},
"operationConfig":{
"dataSource":"notification",
"repo":null,
"operationType":"fetch",
"textMatchStyle":"exact"
},
"startRow":0,
"endRow":75,
"sortBy":[
"modification_date"
],
"componentId":"isc_ListGrid_0",
"appID":"builtinApplication",
"operation":"notification_fetch",
"oldValues":{
}
}
}
Code:
[
{
endRow:4,
totalRows:4,
isDSResponse:true,
invalidateCache:false,
status:0,
startRow:0,
data:[
{
modification_date:new Date(1270443600000),
description:"Zasdf",
notification_id:7
},
{
modification_date:new Date(1273035600000),
description:"Appointment confirmed",
notification_id:4
},
{
modification_date:new Date(1273035600000),
description:"Appointment confirmed",
notification_id:8
},
{
modification_date:new Date(1275714000000),
description:"Appointment confirmed with John smith",
notification_id:6
}
]
}
]
Code:
<DataSource ID="notification" serverType="sql" tableName="notification">
<fields>
<field name="notification_id" type="sequence" hidden="true" sequenceName="notification_notification_id_seq" primaryKey="true" />
<field name="modification_date" title="Date" type="date" />
<field name="description" type="text" />
</fields>
</DataSource>
Comment