Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In my old <a href="http://www.trirand.com/blog/?page_id=393/help/searching-on-text-field-with-accentued-chars-on-local-datas/#p21529" rel="nofollow">answer</a> in the trirand forum I described how to implement custom local filtering and sorting. <a href="http://www.ok-soft-gmbh.com/jqGrid/CustomSearchAndSort.htm" rel="nofollow">The demo</a> shows accent free searching and sorting. If you use the same technique you can overwrite some jqGrid functions used for searching (<code>_toStr</code> and <code>_getStr</code> for example) and implement it so that in case of arrays you will use your own it's implementation.</p> <p>To make my answer more Google friendly I include small code fragment</p> <pre><code>function myAccentRemovement(s) { // the s parameter is always string s = s.replace(/[àáâãäå]/gi,'a'); s = s.replace(/[èéêë]/gi,'e'); s = s.replace(/[ìíîï]/gi,'i'); s = s.replace(/[òóôõöø]/gi,'o'); s = s.replace(/[ùúûü]/gi,'u'); s = s.replace(/[ýÿ]/gi,'y'); s = s.replace(/æ/gi,'ae'); s = s.replace(/œ/gi,'oe'); s = s.replace(/ç/gi,'c'); s = s.replace(/š/gi,'s'); s = s.replace(/ñ/gi,'n'); s = s.replace(/ž/gi,'z'); return s; } //... var oldFrom = $.jgrid.from; $.jgrid.from = function(source,initalQuery){ var result = oldFrom(source,initalQuery); var old_toStr = result._toStr; result._toStr=function(s) { return myAccentRemovement(old_toStr(s)); }; result._getStr=function(s) { var phrase=[]; if(this._trim){ phrase.push("jQuery.trim("); } phrase.push("myAccentRemovement(String("+s+"))"); if(this._trim){ phrase.push(")"); } if(!this._usecase){ phrase.push(".toLowerCase()"); } return phrase.join(""); } return result; } </code></pre> <p>It will be solve the problem. I can't gives you more exact suggestions because you posted no information about the exact structure of data which you use.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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