jQuery UI Widgets Forums Grid Filtering with accent

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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Filtering with accent #46830

    antonomase
    Participant

    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 10 years, 5 months ago by  antonomase.
    • This topic was modified 10 years, 5 months ago by  antonomase.
    • This topic was modified 10 years, 5 months ago by  antonomase.
    Filtering with accent #46833

    Peter Stoev
    Keymaster

    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 Stoev

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

    Filtering with accent #46836

    antonomase
    Participant

    Is it an event to catch what the user types in the filter box and convert it into html string ?

    Filtering with accent #46840

    Peter Stoev
    Keymaster

    Hi antonomase,

    Unfortunately, there’s no such event.

    Best Regards,
    Peter Stoev

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

    Filtering with accent #46841

    antonomase
    Participant

    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 10 years, 5 months ago by  antonomase.
    Filtering with accent #46845

    Peter Stoev
    Keymaster

    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 Stoev

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

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

You must be logged in to reply to this topic.