f.aoData[b] is undefined

f.aoData[b] is undefined

jcreadyjcready Posts: 44Questions: 0Answers: 0
edited May 2012 in General
What does that mean and why is it being thrown?

Edit: this is not longer working [code]oTable.fnFindCellRowIndexes('c5ab74b603362ea63b44d104851430fa70cdedff')[/code] and "b" is supposed to be set to the index returned from this function. Why is this function no longer working? It worked wonderfully when I was passing 'aaData' an array of arrays, but now that I'm using an array of objects and mDataProp, I can no longer get the index of my search query.

I'm guessing the problem has something to do with each row object having a set property called 'length' which is an integer representing the number of seconds in the song.

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Looking at fnFindCellRowIndexes it is coded for arrays, but not for objects - which it probably why it doesn't work there. It looks like it needs to use $.isArray() and if !array then use 'for each' or something like that to scan through everything.

    In fact the "correct" way of doing this in DataTables 1.8+ is to use the fnGetData function which is attached to each column object - or use the fnGetData / _ API methods.

    I've added it to my todo list to checkout this function and get it updated :-)

    Allan
This discussion has been closed.