I've found an issue when trying to sort on a formula field. I've tried a handful of 3.1d and 4.0d nightly builds and the issue seems to be in all of them. I was also able to reproduce in the showcase as well:
http://www.smartclient.com/smartgwt/showcase/#grid_appearance_formula_sumamry_builder
To reproduce -
1. Create a formula field - it doesn't appear to matter what the formula is, but for completeness my formula is simply : "A"
2. Sort on the newly created field.
Nothing happens in the grid and the following error is displayed in the debug console:
http://www.smartclient.com/smartgwt/showcase/#grid_appearance_formula_sumamry_builder
To reproduce -
1. Create a formula field - it doesn't appear to matter what the formula is, but for completeness my formula is simply : "A"
2. Sort on the newly created field.
Nothing happens in the grid and the following error is displayed in the debug console:
Code:
09:08:37.375:MUP0:WARN:Log:TypeError: Object formulaField1 has no method 'getField' Stack from error.stack: eval() @ eval at isc_c_FormulaBuilder_generateFunction (http://www.smartclient.com/smartgwt/showcase/showcase/sc-20121109/modules/ISC_Grids.js:2727:46), <anonymous>:2:42 Array.isc_Arra_sortByProperties() @ showcase/sc-20121109/modules/ISC_Core.js:748:21 ResultSet._doSort() @ showcase/sc-20121109/modules/ISC_DataBinding.js:1586:189 ResultSet.setSort() @ showcase/sc-20121109/modules/ISC_DataBinding.js:1606:75 ListGrid.setSort() @ showcase/sc-20121109/modules/ISC_Grids.js:2027:11 ListGrid.headerClick() @ showcase/sc-20121109/modules/ISC_Grids.js:1919:560 ListGrid._headerClick() @ showcase/sc-20121109/modules/ISC_Grids.js:1914:1129 isc.A.headerDefaults.itemClick() @ showcase/sc-20121109/modules/ISC_Grids.js:637:6089 isc.A.buttonDefaults.click() @ showcase/sc-20121109/modules/ISC_Foundation.js:458:891 StatefulCanvas.handleActivate() @ showcase/sc-20121109/modules/ISC_Foundation.js:195:108
Comment