Certain fields in SearchBuilder not displaying all results of column data on ajax sourced datatable.

Certain fields in SearchBuilder not displaying all results of column data on ajax sourced datatable.

newbieCnewbieC Posts: 25Questions: 6Answers: 0

Link to test case: https://jsbin.com/picoxakece/edit?html,js,console,output
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Certain fields like "Capital" and "Border" fields when using searchbuilder or searchpanes, do not display all table column values
when using Equals field. Why or what is causing this and how do I fix it? Refer to test case and try searchbuilding with "capital" or "border" field values.

This question has an accepted answers - jump to answer

Answers

  • newbieCnewbieC Posts: 25Questions: 6Answers: 0

    Also, noticed that "Empty" and "Not Empty" fields work in inverse. Empty fields display fields that are not empty and not empty does the opposite.

  • kthorngrenkthorngren Posts: 21,388Questions: 26Answers: 4,961
    Answer ✓

    Certain fields like "Capital" and "Border" fields when using searchbuilder or searchpanes, do not display all table column values

    The data is in an array, for example:

    You will need to either return the first element in the array, looks like there is a single element in each array, or do something like this example to have all the array elements displayed in the select list.

    See the capital column for an example of this updated test case:
    https://jsbin.com/daqegokuka/1/edit?js,output

    Also, noticed that "Empty" and "Not Empty" fields work in inverse

    You have this:

       columnDefs:[
          //default content for all columns in case of empty or data not found
          {targets: '_all',  defaultContent: '<b>No Data To Display</b>'}
       ],
    

    So all of the cells have a value. Instead of using columns.defaultContent you will need to use Orthogonal data and return the No Data To Display for the display type if the data is empty. See the currencies column of the updated example.

    Kevin

  • newbieCnewbieC Posts: 25Questions: 6Answers: 0

    Thank you Kevin, appreciate the help!!

Sign In or Register to comment.