Select Fields are empty in DataTables individual column filtering

Select Fields are empty in DataTables individual column filtering

jgcaudetjgcaudet Posts: 82Questions: 7Answers: 0
edited May 2013 in DataTables 1.9
Hi Allan
I use the code in this example http://datatables.net/release-datatables/examples/api/multi_filter_select.html but the select fields in foot are empty.
I see that oSettings.aiDisplay and aiDisplayMaster inside $.fn.dataTableExt.oApi.fnGetColumnData is empty, cause aiRows is empty. If this help, when I call dataTable I use "aoColumns": { "mData": "descripcion2" }, ....

Can you help me?

Replies

  • jgcaudetjgcaudet Posts: 82Questions: 7Answers: 0
    I saw this discussion about this cuestion but I don,t understand what you mean in "... Basically what you want to do is make use of fnServerData to intercept the JSON sent back from the server (the bit where it says to do whatever additional processing - this is the additional processing :-) ) and populate the select menus from extra data sent back. So on the first call to the server (sEcho==0) you could Pass back a few extra parameters tothe client side which are used to populate the select menus."

    I don,t know how to do this. Can you help me?
  • jgcaudetjgcaudet Posts: 82Questions: 7Answers: 0
    Sorry, the discussion is this:
    http://datatables.net/forums/discussion/3931/server-side-filtering-on-specific-columns-with-input-and-select/p1
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    That discussion refers to server-side processing - are you using server-side processing? If so, to be honest, I don't really see the point of the individual column filtering with select inputs, since you need to pass back the whole data set anyway (or at least the unique parts of it). How big is your data set?

    Allan
  • jgcaudetjgcaudet Posts: 82Questions: 7Answers: 0
    Yes, I use server-side processing. I finally modify the funtion _get in editor.php to receive via ajax from de the server the array "select" that you use in the discussion I refer before. But just when I was checking and thinking "it can reach to be too big" I read your answer. What´s the solution you propose ?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    How about allowing free form text input (i.e. with type="text" input elements)? Then you don't need to know the data up front.

    It is possible to do what you are looking for with server-side processing. Perhaps you can link us to the page you are working on please, so we can see what is going wrong?

    Allan
  • jgcaudetjgcaudet Posts: 82Questions: 7Answers: 0
    I send you the link and more information by mail. Thanks
This discussion has been closed.