Grouping with mData

Grouping with mData

Skarv1Skarv1 Posts: 12Questions: 1Answers: 0
edited October 2013 in General
When using plain arrays, the standard suggested row grouping example works great. But when using the mData feature with a named array, the grouping headers all appear as "undefined", due to [code]var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[ columnindex ] [/code] returning 'undefined', leaving me with an undefined sGroup variable. What should I change to make this work?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Well you data object is not an array - so the last bit - column index doesn't make sense (hence the undefined). Simply use the property you want from the object.

    Allan
  • Skarv1Skarv1 Posts: 12Questions: 1Answers: 0
    edited October 2013
    Thanks, replacing [code][ columnindex ][/code] with [code].type[/code] (since i have a property named "type") solved it.

    [code]sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData.type[/code]
This discussion has been closed.