I have a ListGrid that sorts by a column. The column has a displayField and a valueField defined.
The ListGrid starts out with the rows correctly sorted. If the user scrolls down, more data is loaded in the background (the dataArrived function is called).
Eventually, after a few of these background loads, the grid re-sorts and shows the data in an incorrect order -- it has begun sorting by the column's valueField instead of the displayField.
If I click to sort by another column, but then click to sort by the original column, the grid sorts correctly. (Some testing shows that it uses a different sort criteria at this point.)
Thanks for any ideas....
==============
*SmartClient:
SmartClient Version: v10.0p_2015-02-13/LGPL Deployment (built 2015-02-13)
*Browser:
Firefox 36.0.1:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
*Code snippet:
The ListGrid starts out with the rows correctly sorted. If the user scrolls down, more data is loaded in the background (the dataArrived function is called).
Eventually, after a few of these background loads, the grid re-sorts and shows the data in an incorrect order -- it has begun sorting by the column's valueField instead of the displayField.
If I click to sort by another column, but then click to sort by the original column, the grid sorts correctly. (Some testing shows that it uses a different sort criteria at this point.)
Thanks for any ideas....
==============
*SmartClient:
SmartClient Version: v10.0p_2015-02-13/LGPL Deployment (built 2015-02-13)
*Browser:
Firefox 36.0.1:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
*Code snippet:
Code:
this.nationalAccountAccessListGrid = isc.ListGrid.create({
parent: this,
name: "nationalAccountAccessListGrid",
showFilterEditor: true,
dataSource: this.nationalAccountAccessDS,
autoFetchData: true,
selectionType: "single",
selectOnEdit: true,
canEdit: true,
modalEditing: true,
sortFieldNum: 0,
sortDirection: "ascending",
margin: "4",
fields: [
{name: "NATIONAL_ACCOUNT_CUST_ID",
title: "Program Name",
headerTitleStyle: "headerTitleRequired",
width: 195,
align: "left",
optionDataSource: isc.EASDataSources.CMR.nationalAccounts,
displayField: "NATIONAL_ACCOUNT_NAME",
valueField: "NATIONAL_ACCOUNT_CUST_ID",
required: true
},
{name: "PRODUCT_GROUP_ID",
title: "Product Group",
headerTitleStyle: "headerTitleRequired",
width: 150,
align: "left",
optionDataSource: isc.EASDataSources.CMR.productGroups,
displayField: "NAME",
valueField: "ID",
required: true
},
{name: "PRECEDENCE",
title: "Precedence",
width: 80,
headerTitleStyle: "headerTitleRequired",
required: true
},
{name: "MANDATORY_FLAG",
title: "Mandatory",
headerTitleStyle: "headerTitleRequired",
width: 65,
optionDataSource: isc.EASDataSources.EAS.YNLOV,
displayField: "YES_NO_LBL",
valueField: "YES_NO_VAL",
defaultValue: "N",
required: true
},
{name: "COMMENTS",
title: "Comments"
},
{name: "LAST_UPDATED_BY",
title: "Last Upated By",
detail: true
},
{name: "LAST_UPDATE_DATE",
title: "Last Updated Date",
detail: true
},
{name: "CREATED_BY",
title: "Created By",
detail: true
},
{name: "CREATION_DATE",
title: "Creation Date",
detail: true
}
] });