Retrieve filtered datas

Retrieve filtered datas

greg79greg79 Posts: 2Questions: 0Answers: 0
edited October 2011 in General
Hi,

I use datatable for a 400 rows table, and users can filter datas. When filter is Ok i'd like to retrieve only filtered datas.
I've tried fnGetDatas but it always return all rows.
I don't see how to do this.
Does someone can help me?

thanks

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    fnFilter

    http://www.datatables.net/ref#fnfilter
  • greg79greg79 Posts: 2Questions: 0Answers: 0
    thanks but it is not what i need. fnFilter works for the display but i want to retrieve filtered datas.

    As Exemple :
    First i count all datas :
    oDataTable.dataTable().fnGetData(); It returns 400rows (all datas)
    Then i filter the table oDataTable.dataTable().fnFilter('my word'). Here display show 8 lines, but fnGetData() still return 400rows, not 8.
    What i need is a way to retrieve only filtered row.

    any idea?
  • GregPGregP Posts: 500Questions: 10Answers: 0
    This is what server-side processing is for. ;-) http://datatables.net/usage/server-side

    The server has to process the variables you send it, though. There's no way for the server to be instantly "aware" of your filtering and know to return the sorted values. You will pass it the sorting terms, and the server will return them.
This discussion has been closed.