column filter for search null records?

column filter for search null records?

lovedhakalovedhaka Posts: 6Questions: 4Answers: 1

we are using this.api().column().search().draw() for filter table column data? Is there any way to display data having null column records?

Answers

  • kthorngrenkthorngren Posts: 20,141Questions: 26Answers: 4,736

    You would need to use regex search and turn off smart search. The following regex string should return NULL rows or rows the begin with one or more spaces (or any whitepace char) and don't have other characters.

    '^\s*$'

    Kevin

  • lovedhakalovedhaka Posts: 6Questions: 4Answers: 1

    You mean like this way,
    this.api().column().search('^\s*$', true, false).draw();

    we have set these property too
    processing: true,
    serverSide: true,
    searching: true

    and bsearchable: true for column.

    Please suggest some example.

  • kthorngrenkthorngren Posts: 20,141Questions: 26Answers: 4,736

    With serverside processing the server side scripts handle the searches. What are you using for your serverside scripts?

    Kevin

  • lovedhakalovedhaka Posts: 6Questions: 4Answers: 1

    node js (hapi).

    In server side query for column search, I'm getting where 'fieldname' like '%VAL%'

This discussion has been closed.