General Filter customization

General Filter customization

xallosxallos Posts: 1Questions: 0Answers: 0
edited July 2013 in General
Hello,

I am using DataTables and I need to filter my data using the global filter, but I need to customize it a little bit. For example my current need is to create a regular expression from the filter value the users types, and match against that. I want to perform that action client side since my data are already loaded via a 2D array of an array of objects.

Workarounds that wont work for me and the reason...
1. Server side filtering would work, but my data are already in the page (could be either a pre-filled html table or an ajax originated json or array source).
2. Other custom filtering methods, since I do not have the filtering term the user has entered.
3. Have the user type the regular expression in the searchbox, since the users are not that expirienced and even if I have the text replaced as the user types with the correct reg.exp. the user experience would be poor.

Thank you in advance for your time and effort,

xallos

Replies

  • koosvdkolkkoosvdkolk Posts: 169Questions: 0Answers: 0
    [quote]Put your custom filter in place using standard DOM / jQuery techniques and then use fnFilter ( http://datatables.net/api#fnFilter ) to apply the filter to DataTables.[/quote]

    http://www.datatables.net/forums/discussion/6180/howto-add-custom-search-field/p1
This discussion has been closed.