Pre-populate value in serach Builder
Pre-populate value in serach Builder
Nithin N M
Posts: 6Questions: 4Answers: 0
1.I need to pre-populate some value in search builder value option even though there is no data in data table
2. I need to load values from database
Answers
Are you saying you want to get the values, to build predefined Search Builder filters, from the Datatase? If so then use jQuery ajax() to fetch the predefined filter values and initialize Datatables, with these values, in the
success
function.Kevin
searchBuilder.preDefined
is the property to use to set an initial condition.Obviously you can't use the
=
operator for conditions since that shows aselect
derived from the data in the table, so there would be no options to select from in an empty table.However, you could use
contains
or any other condition type that uses ainput
. For example: https://live.datatables.net/kireqami/1/edit .Allan
Thank You