Hi all,
I'm having a problem with the sorting on grids I am building. I have looked extensively around the forum but can't see anything pertaining to the problem I am having.
Basically, when I go to sort the grid by clicking on the headers it will only sort them in ASC order regardless of how many times I click. However, if I click on the little arrows and select sort desending/ascending from the menu that appears it works fine.
The column model is as follows:
Code:
cmEnquiries = new Ext.grid.ColumnModel([
{header: "Enquiry #", dataIndex: "enquiry_number", width: 100},
{header: "Client", dataIndex: "client_id", width: 100, renderer: lookupClientName, sortType: lookupClientName},
{header: "Ship Name", dataIndex: "ship", id: 'enquiry-grid-ship' },
{header: "IMO Number", dataIndex: "imo_number" },
{header: "Status", dataIndex: "status", renderer: lookupStatus, width: 150}
]);
cmEnquiries.defaultSortable = true;
The store itself has a default sorting as follows:
Code:
thisStore.setDefaultSort('enquiry_id', 'ASC');
The rest of the code is standard grid stuff, does anyone have any idea what might be causing this to happen? Thanks
Edit: A point of note as well is that the request to the server always contains ASC as the sort so it definitely isn't a case of the server not sorting it.