HTML Elements Forums Data Grid addFilter with boolean conditions

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by Avatar Yavor Dashev 1 week, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #101319
    Avatar
    Cetin Sert
    Participant

    addFilter(‘ColumnName’, ‘equal true’)

    results in the filter entry: {value: true, condition: “EQUAL”, type: “booleanFilter”, key: “##”}
    not the expected:  {value: true, condition: “EQUAL”, type: “booleanFilter”, key: “###”}

    and does not work. Is there a different syntax one should use?

    #101321
    Avatar
    Yavor Dashev
    Participant

    Hi Cetin Sert,

    Yes the syntax is a bit different if you want to have a boolean expression.

    The addFilter method should look like this:
    addFilter(‘ColumnName’,’equal YourCondition‘)

    Please, do not hesitate to contact us if you have any additional questions.

    Best regards,
    Yavor Dashev

    Smart UI Team
    https://www.htmlelements.com/

    #101323
    Avatar
    Cetin Sert
    Participant

    addFilter(‘ColumnName’,’equal YourCondition‘)

    How can I formulate the bold part? Can one provide a concrete example?

    #101324
    Avatar
    Yavor Dashev
    Participant

    Hi Cetin Sert,

    For example if you have a data grid with column with names and you want in it to be displayed only certain name you can do it like this:

    addFilter(‘firstName’,’equal Andrew‘)

    This filter will return the ‘firstName’ column containing only rows containing the name ‘Andrew’.
    For more information :https://www.htmlelements.com/demos/grid/filtering/#toc-addfilter

    Please, do not hesitate to contact us if you have any additional questions.

    Best regards,
    Yavor Dashev

    Smart UI Team
    https://www.htmlelements.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.