draw is egal null
draw is egal null
![Masinga](https://datatables.net/forums/uploads/userpics/778/n9K3TE3G6UDHS.jpg)
Hello everyone,
I am stuck on datatable by the search customize columns with the select. everything works, except that the give does not refresh and does not change anything, in the post draw I receive null or 0.
with the select search it's ajax on the initComplet function, and I get the data from the backend. that the console but nothing happens. help
This question has accepted answers - jump to:
Answers
That would be a problem in the server script not updaing the
draw
parameter properly. Are you using a server side processing script provided by Datatables?Kevin
thank you in advance,
I receive 0 then I made a condition if it is null to put 0 . and on my table I have well and truly serverside on true.
As far as I know the client side will never send
draw: 0
when server side processing is enabled. It starts with1
and increments for each request. Can you post a link to your page or a test case showing the issue so we can help debug?Use the browser's network inspector tool to see what is being sent.
Kevin
Hi, I'm sending you some screenshots of my custom select and the backend and ajax that sends the request to the backend
how to activate draw on ajax of my function initComplete. as ja' customize the columns. thanks
The ajax request you have in
initComplete
is using jQuery ajax() not Datatable'sajax
option. So its not going to send adraw
parameter. You won't be able to update the Datatables table this way. See some options below.Are the select options to be used as column searches? If yes, maybe something like this example will work better as it uses
column().search()
and will send the search terms as described in this server side processing protocol doc.Are the select options for searching data outside of the columns? If yes then try using
-optoin ajax.data
as a function, like this example. In the select change event handler callajax.reload()
to refresh the data.Kevin
thank you very much
I want to search on all data in the database. I have a question how can I make my selects a search column, please I don't understand the part, if you could see the capture on the nes selects. I am a junior developer, I can't understand your solution. the problem is how can I make the selects option in Datatable search column?
please example code
Hi Kevin ,
Please help me sincerely, I really don't know how to make the value of my , select as Datatable search input. It has been three days of work, but still no solution, I try everything.
@Masinga
I am trying to understand what you are saying. Unsuccessfully so.
Could you summarize what your problem is in your own language and use a translator to translate it into English? That might help!
This is a good translator: https://www.deepl.com/translator
Could you link to a page showing the issue? Or make a test case?
Roland
Hello Roland,
thank you very much, I finally found a solution.
In the future, I will make your recommendation.
Thank you, have a good weekend.