jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Grid Localization – Filter
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 8 years, 7 months ago.
-
Author
-
Hello,
I have two languages I need the grid to display, ENG/SPA. I am able to update the localization for the filter row filter using:
var localizationobj = {};
localizationobj.filterstringcomparisonoperators = [“empty”, “not empty”, “contains”, “contains(match case)”,
“does not contain”, “does not contain(match case)”, “starts with”, “starts with(match case)”,
“ends with”, “ends with(match case)”, “equal”, “equal(match case)”, “null”, “not null”]$(“#jqxGrid”).jqxGrid(“localizestrings”, localizationobj);
I set the filterstringcomparisonoperators attribute to an array containing the Spanish values when I need to flip the values.
My question is how do I remove certain values? i.e some of the properties in the array are not useful/duplicated to the average user, such as not empty/not null etc.
When I manually remove them from the array and set the localization, they are removed from the filter but it doesn’t seem like the functionality is working as the default filter is set to a different value other than contains (default filter value), and the filters seem to be mapped to other values (i.e contains is not mapped to some other value).
It seems like I have to update the filter somehow, am I supposed to use the “updatefilterconditions” for the jqxgrid?
Hello iLoveJQWidgets,
You could create two (or more) “localizationobj” with the appropriate settings.
If you interact with this demo, you could create some workaround.
Please, take a look at those demos could be helpful too:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/localization.htm?light
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/filtering-menu-custom-widgets.htm?light
The last demo demonstrate how to create custom filter menu, thus you to create filter that work on wanted way.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
I took a look at those demos and they don’t seem to solve the issue.
I need to remove values from filterstringcomparisonoperators so I can just use the ones I need, instead of a bunch of unnecessary ones.
So for an example when I click on the down arrow beside the filter row, it should just list a few options instead of all the ones below:
localizationobj.filterstringcomparisonoperators = [“empty”, “not empty”, “contains”, “contains(match case)”,
“does not contain”, “does not contain(match case)”, “starts with”, “starts with(match case)”,
“ends with”, “ends with(match case)”, “equal”, “equal(match case)”, “null”, “not null”]Hello iLoveJQWidgets,
I would like to suggest you another approach.
Please, take a look at this demo:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/filterconditions.htm?light
Hope this helps.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.