jQWidgets Forums

jQuery UI Widgets Forums Grid "Custom" Filtering – External Criteria

This topic contains 1 reply, has 2 voices, and was last updated by  Christopher 8 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • iLoveJQWidgets
    Participant

    I’ve looked over the API documentation but haven’t found what I’m looking for.

    I will need a filter row (text area for user to enter search term), but instead of filtering that specific column, it needs to filter based on an external criteria mapped to that row.

    For example if i have

    *

    Column Person

    Row 1 = Bob
    Row 2 = John

    *
    on Column Person I have a filter row, and If I search the term “married”, It should display Bob because in my backend I have Bob’s marriage property set as married.

    Awful example but hopefully my idea comes across clearly. Is it possible to filter based on external criteria?


    Christopher
    Participant

    Hi iLoveJQWidgets,

    filtering by external criteria isn’t supported out of the box. However, what you are trying to do is possible. You just need to make your own custom filtering function that checks on the backend side to see which of the people from your records are married and then return their ID. After that you can use “getrowdatabyid” to get the rest of the data for the record and then pass it to the grid as a new source.
    Here is an example for creating a custom filter:
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/customfiltering.htm?light

    Best Regards,
    Christopher

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.