I am currently trying to intercept the search text provided by the igCombo on autocomplete remote filtering.This works, (below ) although it seems that when I tab away from the combo box a UI event clears my selection.Json data totals seems to get lost when you customize the Query on the web server (i.e. ...,{":totals:":"1:8"}]I am assuming this is a common issue with the combo box, because it's pretty standard to want to customize the query based on the text provided in the combo box.Is there a way to prevent the combo box from bieng cleared out during the "blur" event?[ComboDataSourceAction] [ActionName("filtering-data")] public ActionResult ComboGetData() { var mainQuery = products.AsQueryable(); NameValueCollection col = this.HttpContext.Request.QueryString; string filterName = col["filter(FullName)"]; if (filterName != null) { string filterArgs = filterName.Substring(9).Replace(")", String.Empty).ToLowerInvariant(); mainQuery = mainQuery.Where( p => p.Name.ToLowerInvariant().StartsWith(filterArgs) || p.Name2.ToLowerInvariant().StartsWith(filterArgs)).AsQueryable(); } var ds = mainQuery; return View(ds); }
Any help will be appreciated.
I managed to get the correct behaviour in the UI during filtering which is why I thought I had the solution as per (http://ko.infragistics.com/community/forums/t/72010.aspx) but due to a UI event clearing out the control when it loses focus I am back to square 1.
Jean
Hi Jean,
The igCombo with default options does not allow a value which is not present in current dataSource. On blur event the igCombo tries to find a matching item for current text. If item is not found, then text is considered illegal and value/text is cleared.
The igCombo has option/property allowCustomValue, which disables "match" validation. However, functionality of igCombo with that option is quite different and application should not assume that value in igCombo represents an item in dataSource.