Neither external nor default autosearch are working when using a mssql database with cyrillic elements.
PS:
If the method for connecting to the db is this one adding the last line would be a solution.
$serverName = “”; //serverName\instanceName
$connectionInfo = array( “Database”=>””,
“UID”=>””, “PWD”=>””,
“CharacterSet” => “UTF-8” ); <—- this line
$conn = sqlsrv_connect( $serverName, $connectionInfo);
Hello,
It’s fixed in latest build. We’re already using charset utf8 for mssql but the solution was to make it nvarchar compatible, which uses N’string pattern in search.
You can email me ([email protected]) your order number or payment email to get update.
Okay great, will do.
Is there a way to do external search on 2 fields simultaneously?
Yes, thats doable with JS api and working demo is available in demos/search/search-form.php
PS: emailed you latest update for cyrillic character query.
Autosearch got fixed, however, external search is still not properly working.
Here is the external search function (it is still working when the data and query are in English though). My guess is that the problem is not in the grid implementation, since autofilter is working properly, but rather in this function.
jQuery(“#search_text”).click(function() {
grid = jQuery(“#list1”);
// open initially hidden grid
// $(‘.ui-jqgrid-titlebar-close’).click();
var searchFilter = jQuery(“#filter”).val(), f;
if (searchFilter.length === 0)
{
grid[0].p.search = false;
jQuery.extend(grid[0].p.postData,{filters:””});
}
else
{
f = {groupOp:”OR”,rules:[]};
// initialize search, ‘name’ field equal to (eq) ‘Client 1’
// operators: [‘eq’,’ne’,’lt’,’le’,’gt’,’ge’,’bw’,’bn’,’in’,’ni’,’ew’,’en’,’cn’,’nc’]
f.rules.push({field:”NAME”,op:”bw”,data:searchFilter});
//f.rules.push({field:”invdate”,op:”bw”,data:searchFilter});
grid[0].p.search = true;
// if toolbar filter, keep in with external search form
if (grid[0].p.postData.filters != undefined && grid[0].p.postData.filters != ”)
{
var toolbar_filters = JSON.parse(grid[0].p.postData.filters);
var combine_filters = {groupOp:”AND”,rules:[],groups:[toolbar_filters,f]};
}
else
var combine_filters = f;
jQuery.extend(grid[0].p.postData,{filters:JSON.stringify(combine_filters)});
}
grid.trigger(“reloadGrid”,[{jqgrid_page:1,current:true}]);
return false;
})
jQuery(“#clear_text”).click(function() {
grid = jQuery(“#list1″);
grid[0].p.search = false;
jQuery.extend(grid[0].p.postData,{filters:””});
//removes get request
//window.location = window.location.href.split(“?”)[0];
// keeps get request
grid.trigger(“reloadGrid”,[{jqgrid_page:1,current:true}]);
return false;
});