jQWidgets Forums

jQuery UI Widgets Forums Grid Filtering on data that isn't displayed in the grid

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 9 months ago.

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

  • Bazman
    Participant

    Hi,

    In our grid we have some “rich” cells that contain a number of data fields from the data source using custom renderers. We have our own UI for users to be able to filter on elements on data in that cell.

    From what I can tell, the filtering capabilities of jqxGrid are limited to columns defined. There doesn’t appear to be a way to filter based on the underlying data rows?

    So, is the best solution to do the filtering at the data adapter level? At which point would I do it?

    Or, perhaps add hidden columns to the jqxGrid containing the raw data elements we wish to filter on, and use the jqxGrid filtering that way.

    What would be the best solution? Particularly from a performance point of view.

    Cheers,
    Kelly.


    Peter Stoev
    Keymaster

    Hi Kelly,

    Yes, you can filter only the data loaded into the Grid using the Grid’s columns filters. Filtering on the dataAdapter is not supported. the DataAdapter only loads data from local or remote data source.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    Bazman
    Participant

    Thanks for the quick reply Peter.

    Filtering on hidden columns should be fine though?

    If I was do it at the dataAdapter level, I imagine I do something like this every time the filter changed:

    source.localdata = filteredData(data);
    dataAdapter.dataBind();

    is dataAdapter.dataBind() an expensive process?

    Thanks again,
    Kelly.


    Peter Stoev
    Keymaster

    Hi Kelly,

    dataBind rebinds the dataAdapter and re-renders the widget. This will definitely affect your app’s perf. if you do it frequently. You can apply a filter to a hidden column only through the Grid’s API.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.