Note that there are some explanatory texts on larger screens.

plurals
  1. POjqGrid custom filtering with build in filtering toolbar
    text
    copied!<p>I'm using the latest jqGrid version and I'm wondering if it's possible to do local filtering with custom rules (see example below). First of all, the filter toolbar can be switched on by applying</p> <p><code>jQuery("#grid").jqGrid('filterToolbar', options);</code></p> <p>In the past I implemented this manually (the version I currently use does not support local filtering, so I added this feature according the my needs) and now, after an update to the latest version, I asked myself if jqGrid offers this functionalty by default (Not the local filtering, which it does, but the custom filtering rules) as the functionality impressively increased over the last months. I read the documentation and searched the internet, but did not find a suitable example.</p> <p>Here is an example of what I want to achieve.</p> <p>There's a column <code>First Name</code> which hold the first name of the persons displayed. </p> <pre><code>Stefan Stephan Stephano Stelios Philip Phillip Philipp Ivan Iwan ... </code></pre> <p>Now the user enters <code>Ste</code> in the filtering bar for column <code>First Name</code> and the result with the default filtering algorithm should be :)</p> <pre><code>Stefan Stephan Stephano Stelios </code></pre> <p>So far so good. But what if I want to display names which are ortographically similar? I want the user to enter <code>Ste*an*</code> to only display</p> <pre><code>Stefan Stephan Stephano </code></pre> <p>So you see, <code>*</code> stands for a wildcard for any character zero or more times. Additionally I want the user to be able to enter <code>Ste?an*</code> resulting in </p> <pre><code>Stefan </code></pre> <p>where <code>?</code> means any character exactly once. One last requirement is to make the filtering more tolerant and matching not only the hole line (starting and ending, equivalent to regular expressions), but matching the column value if it contains the text entered, i.e. <code>e*o</code> matching</p> <pre><code>Stephano Stelios </code></pre> <p>If you could give me a hint with the <code>*</code> wildcard, the other problems should right themselves.</p> <p>Thanks in advance</p> <p>Kai</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload