information on search
information on search
legolas82
Posts: 3Questions: 1Answers: 0
Hi,
I would like to do a search on the fields of the table, but also have filters through fields relating to detail, therefore not present in the table. In this case, if you change the values โโof these fields I would like to request the data from the server and then filter the data based on the field filters defined on the table, is it possible to do so?
Answers
I'm not too clear how that works, sorry. When you say changing the fields, is that using Editor, or some other method? If you could expand on your description, please, that would help us understand what you're trying to do.
Colin
Hi Colin,
first of all thanks for the quick reply. Above table I have input to filter table.
There are inputs directly associated with columns present in the table below and inputs present in their detail.
example table name,surname
in detail also city
I would filter records also for city, in this case I would send request to server after clicking filter button. if I modify a field in the table it should filter directly (ex. name).
You can use
ajax.data
to send extra parameters to the server for things like filtering data. In your button click event useajax.reload()
. See this example. Server side processing is not required for this to work.Sorry I don't understand how you want this to work. Please provide more details or a test case showing what you have so we can offer suggestions.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
thanks Kevin, for last point
if I modify an input which is associated with a field in the table below it must not send anything to the server.
I guess that would be under your control. In the event handler you will need to check to see if the
ajax.reload()
should be used thus sending the filter data to the server.Kevin