I have a jqgrid which i enabled multiple search for and i wanna change the \"AND\" and \"OR\" group operation texts to their corresponding values in my native language.
It's a good question! +1 from me.
The current jqGrid code build corresponding element using the same values for the displayed text and the
value
attribute used in the query. As a workaround I suggest you the define the function updateGroupOpText
var updateGroupOpText = function ($form) {
$('select.opsel option[value="AND"]', $form[0]).text('My ADD');
$('select.opsel option[value="OR"]', $form[0]).text('My OR');
$('select.opsel', $form[0]).trigger('change');
};
and use it as the event handler for onInitializeSearch
and afterRedraw
events:
jQuery("#kontrollist").jqGrid('navGrid', '#controllistpager',
{ add: false, edit: false, del: false },
{}, {}, {},
{ // search options
multipleSearch: true,
onInitializeSearch: updateGroupOpText,
afterRedraw: updateGroupOpText
}
);
See the corresponding demo here, which displays the dialog like the following:
You should just change "My ADD" and "My OR" to the texts which you want.