how filtering works ?

how filtering works ?

SudiptaSudipta Posts: 23Questions: 0Answers: 0
edited April 2013 in General
Can anybody help me understand how filtering is done in Datatable library?

Replies

  • BernardoLimaBernardoLima Posts: 20Questions: 0Answers: 0
    Do you want to implement filtering on you datatable?
    Or do you want just to understand how it works?
  • SudiptaSudipta Posts: 23Questions: 0Answers: 0
    i want to implement filtering on my datatable. The table I'm working with has nested tables, so I think not filtering logic can not be applied
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    edited April 2013
    Filtering in DataTables works by having an internal property called `aiDisplay` , with is an array of indexes pointing to the `aoData` array, which is the row definitions for each row used int he table. When the table is drawn a loop it performed over `aiDisplay` , selecting the rows to be shown. To filter out rows, they are removed from `aiDisplay` . That's how the filtering works in DataTables.

    Allan
  • SudiptaSudipta Posts: 23Questions: 0Answers: 0
    Ok done that. I had a table with nested tables inside. After applying datatable the width of the tables changes . Previously the width of the table in 692px , but after applying datatable the width of the table changes to 1537px. And this width can be decreased in any way . Can anybody help ?
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    Done what?

    Also, please link to a test case if you have a specific question.

    Allan
This discussion has been closed.