SOLVED: Column filter params out of sync with sort params if a column is hidden?

SOLVED: Column filter params out of sync with sort params if a column is hidden?

ddrakeddrake Posts: 16Questions: 0Answers: 0
edited August 2011 in General
Using server-side processing with a table with several columns, with column 0 containing a primary key that I want to hide. Also using individual column filters (input elements).

If column 0 (primary key) is visible, both the sorting and filtering work as expected. For example, if I have a sort and filter in place on column 1, I see
- iSortCol_0 = 1 and
- sSearch_1 = 'zyx'

as expected.

If column 0 is hidden, the sort parameters are getting passed correctly to the server, but the filter params seem to be out of sync. If I set the sort and filter as before on column 1, I see
- iSortCol_0 = 1 (as before) -- but
- sSearch_0 = 'zyx'

Why is the filter parameter set to column 0 instead of column 1? Can anyone help?

Replies

  • ddrakeddrake Posts: 16Questions: 0Answers: 0
    Also, with column 0 hidden, the server is seeing bSearchable_0 = false, which is correct.

    so it seems to be necessary to modify the server-side php code to something like this:

    [code]// Individual column filtering
    for ( $i=1 ; $i
  • ddrakeddrake Posts: 16Questions: 0Answers: 0
    Ok, this is answered here: http://www.datatables.net/forums/discussion/341/column-filter-when-a-column-is-hidden-with-bvisible/p1

    I thought it was an issue specific to server-side filtering
This discussion has been closed.