jQuery UI Widgets › Forums › Grid › Filtering with accent
Tagged: filtering in jqwidgets grid
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 9 years, 9 months ago.
-
AuthorFiltering with accent Posts
-
Hi,
In a grid, i read datas from a php page which produces json.
If i want to user letters with accents, i must transform the string with php function htmlentities. eg the letter é becomes & e a c u t e ;It is well displayed in the grid. But i want to use a filter box. And if i type é on my keyboard, the grid shows no rows.
If i want to see all the words which contains é (like été, société, …) I have to type & e a c …Which is not very ergonomic…
So my question :
In my grid cells, i have words with letters with accents. They are coded as html strings (& something ; ). How use the filter box to retrive these word when typing é, ç, à, è, ê, …Thanks
- This topic was modified 9 years, 9 months ago by antonomase.
- This topic was modified 9 years, 9 months ago by antonomase.
- This topic was modified 9 years, 9 months ago by antonomase.
Hi antonomase,
The Filtering Matches Strings, Numbers or Dates. It does not understand from HTML nor HTML Strings. It is simple, what you type in the Filter Box is compared to what you have as a Cell Value, if the result is OK, the Grid displays the cell.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Is it an event to catch what the user types in the filter box and convert it into html string ?
Hi antonomase,
Unfortunately, there’s no such event.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Unfortunately it is not simple for all those who use letters with accents. We have to set the parameters for the database, for the langage, for the browser, for the html, … sometimes it is utf8, sometime not. And when you migrate from an environment of development to an environment of production, it is necessary to begin again everything.
The only simple way to manage accents is to use the HTML codes : it is universal.Can I use loadcomplete over the data adapter to convert all the html codes to “true” chars. But it can be very long
Thanks
- This reply was modified 9 years, 9 months ago by antonomase.
Hi antonomase,
A better option would be to use “beforeLoadComplete”, see: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdataadapter/jquery-data-adapter.htm. By using it, you can make modifications before loading the data.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.