Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    error when sorting grouped column

    Hi there,

    We are seeing an issue when sorting by a grouped column in 6.5.1.

    This is the stack trace from IE of the error we see:

    Code:
    11:30:38.156:TMR4:WARN:Log:Error:
    	''Sector' is undefined'
    	in https://www.oursite.com/beta/isoversion/6.5.1/isomorphic/system/modules/ISC_Core.js?isc_version=6.5.1.js
    	at line 860
        [a]ResultTree.$27i(obj=>Obj, property=>"fundSectorGroup-Sector", [ATListGrid ID:fundAssetsGrid])
        Array.sortByProperties(Obj)
        Array.sortByProperty(_1=>"fundSectorGroup-Sector", _2=>false, _3=>[a]ResultTree.$27i(), _4=>[ATListGrid ID:fundAssetsGrid])
            "return this.sortByProperties({property:_1,direction:_2,normalizer:_3,context:_4})"
        Tree.getChildren(_1=>Obj, _2=>undef, _3=>[a]ResultTree.$27i(), _4=>false, _5=>undef, _6=>[ATListGrid ID:fundAssetsGrid])
        Tree.getOpenList(_1=>Obj, _2=>undef, _3=>[a]ResultTree.$27i(), _4=>false, _5=>undef, _6=>undef)
        Tree.$27l()
        Tree.getLength()
            "return this.$27l().length"
        ListGrid.getTotalRows()
        ListGrid.dataChanged(_1=>undef, _2=>undef, _3=>undef, _4=>undef)
        Class.invokeSuper(_1=>null, _2=>"dataChanged", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef)
        Class.Super(_1=>"dataChanged", _2=>Obj{length:0}, _3=>undef)
        [o]ATListGrid.dataChanged()
        dataChangedObservation()
        Tree.sortByProperty(_1=>"fundSectorGroup-Sector", _2=>false, _3=>"text", _4=>[ATListGrid ID:fundAssetsGrid])
        ListGrid.sortData()
        ListGrid.sort(_1=>15, _2=>false)
        ** recursed on Class.invokeSuper

    This doesn't happen with every field in the grid. But, it is happening with fields that we dynamically add to the Datasource fields list and to the list of grid fields using this logic to generate a field object:

    Code:
    							var fieldObj={
    							name:CUSTOM_FIELD_TOKEN+customFieldName,
    							width:"10%",
    							showIf:"return false;",
    							getGroupValue:function(value,record,field,fieldName,grid){return this.formatCellValue(value,record,null,null,grid);},
    							formatCellValue:"return formatString(record,value);",
    							title:fieldTitle,
    							type:"text",
    							canGroupBy:true
    							};

    So, any idea why this is happening? It unfortunately causes an infinite loop of errors that forces us to refresh the browser.

    #2
    Field names must be valid JavaScript identifiers and it looks like your fieldName ends in "-Sector".

    Comment

    Working...
    X