information on search

information on search

legolas82legolas82 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

  • colincolin Posts: 14,208Questions: 1Answers: 2,408

    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

  • legolas82legolas82 Posts: 3Questions: 1Answers: 0

    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).

  • kthorngrenkthorngren Posts: 15,822Questions: 25Answers: 3,751

    I would filter records also for city, in this case I would send request to server after clicking filter button

    You can use ajax.data to send extra parameters to the server for things like filtering data. In your button click event use ajax.reload(). See this example. Server side processing is not required for this to work.

    if I modify a field in the table it should filter directly (ex. name).

    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

  • legolas82legolas82 Posts: 3Questions: 1Answers: 0
    edited January 13

    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.

  • kthorngrenkthorngren Posts: 15,822Questions: 25Answers: 3,751

    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

Sign In or Register to comment.