jQWidgets Forums
Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
-
Author
-
June 26, 2014 at 9:09 am in reply to: jqxInput autocomplete in full text search jqxInput autocomplete in full text search #56417
Probably control must disable search results found.
Can this be done?June 26, 2014 at 7:53 am in reply to: jqxInput autocomplete in full text search jqxInput autocomplete in full text search #56409Mirror (without authenticate)
https://yadi.sk/i/2p_7qF5OUwyhh
https://yadi.sk/i/kkdlH642Uwyjb
https://yadi.sk/i/2SkbqiCYUwyjyJune 26, 2014 at 7:48 am in reply to: jqxInput autocomplete in full text search jqxInput autocomplete in full text search #56408June 26, 2014 at 7:46 am in reply to: jqxInput autocomplete in full text search jqxInput autocomplete in full text search #56407Yes. I input some text in text box. Then control send ajax jquery request to server. On the server side i seek streets in database. I use full text search on server side. Therefore if i input text “So Da” i will find variants “South Dakota”. But control not show me finded results.
I create simple example. To show my problem.
Client side:
<input style="padding-left:3px" type="text" id="street" /> <script> $("#street").jqxInput({ searchMode: 'none', items: 100, placeHolder: "Enter State", height: 28, width: 400, source: function (query, response) { var dataAdapter = new $.jqx.dataAdapter ( { datatype: "json", datafields: [ { name: 'Name' }, { name: 'Value' } ], url: '@Url.Action("TestStateSearch")' + '?searchStr=' + query, }, { autoBind: true, formatData: function (data) { data.name_startsWith = query; return data; }, loadComplete: function (data) { if (data.length > 0) { response($.map(data, function (item) { return { label: item.Name, value: item.Value } })); } } } ); } }); </script>
Server side (ASP .NET MVC C#):
public class TestStateSearchResult { public string Name; public string Value; public TestStateSearchResult(string number, string state) { this.Name = state; this.Value = number; } } public class CallcenterController : Controller { public JsonResult TestStateSearch(string searchStr) { //This is Example. We always return all states to demonstrate the problem List<TestStateSearchResult> retColl = new List<TestStateSearchResult>(); retColl.Add(new TestStateSearchResult("00","Alabama")); retColl.Add(new TestStateSearchResult("01","Alaska")); retColl.Add(new TestStateSearchResult("02","Arizona")); retColl.Add(new TestStateSearchResult("03","Arkansas")); retColl.Add(new TestStateSearchResult("04","California")); retColl.Add(new TestStateSearchResult("05","Colorado")); retColl.Add(new TestStateSearchResult("06","Connecticut")); retColl.Add(new TestStateSearchResult("07","Delaware")); retColl.Add(new TestStateSearchResult("08","Florida")); retColl.Add(new TestStateSearchResult("09","Georgia")); retColl.Add(new TestStateSearchResult("10","Hawaii")); retColl.Add(new TestStateSearchResult("11","Idaho")); retColl.Add(new TestStateSearchResult("12","Illinois")); retColl.Add(new TestStateSearchResult("13","Indiana")); retColl.Add(new TestStateSearchResult("14","Iowa")); retColl.Add(new TestStateSearchResult("15","Kansas")); retColl.Add(new TestStateSearchResult("16","Kentucky")); retColl.Add(new TestStateSearchResult("17","Louisiana")); retColl.Add(new TestStateSearchResult("18","Maine")); retColl.Add(new TestStateSearchResult("19","Maryland")); retColl.Add(new TestStateSearchResult("20","Massachusetts")); retColl.Add(new TestStateSearchResult("21","Michigan")); retColl.Add(new TestStateSearchResult("22","Minnesota")); retColl.Add(new TestStateSearchResult("23","Mississippi")); retColl.Add(new TestStateSearchResult("24","Missouri")); retColl.Add(new TestStateSearchResult("25","Montana")); retColl.Add(new TestStateSearchResult("26","Nebraska")); retColl.Add(new TestStateSearchResult("27","Nevada")); retColl.Add(new TestStateSearchResult("28","New Hampshire")); retColl.Add(new TestStateSearchResult("29","New Jersey")); retColl.Add(new TestStateSearchResult("30","New Mexico")); retColl.Add(new TestStateSearchResult("31","New York")); retColl.Add(new TestStateSearchResult("32","North Carolina")); retColl.Add(new TestStateSearchResult("33","North Dakota")); retColl.Add(new TestStateSearchResult("34","Ohio")); retColl.Add(new TestStateSearchResult("35","Oklahoma")); retColl.Add(new TestStateSearchResult("36","Oregon")); retColl.Add(new TestStateSearchResult("37","Pennsylvania")); retColl.Add(new TestStateSearchResult("38","Rhode Island")); retColl.Add(new TestStateSearchResult("39","South Carolina")); retColl.Add(new TestStateSearchResult("40","South Dakota")); retColl.Add(new TestStateSearchResult("41","Tennessee")); retColl.Add(new TestStateSearchResult("42","Texas")); retColl.Add(new TestStateSearchResult("43","Utah")); retColl.Add(new TestStateSearchResult("44","Vermont")); retColl.Add(new TestStateSearchResult("45","Virginia")); retColl.Add(new TestStateSearchResult("46","Washington")); retColl.Add(new TestStateSearchResult("47","West Virginia")); retColl.Add(new TestStateSearchResult("48","Wisconsin")); retColl.Add(new TestStateSearchResult("49", "Wyoming")); JsonResult r = Json(retColl, JsonRequestBehavior.AllowGet); return r; } }
I create three screenshots. The third screenshot display my problem.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)