jQWidgets Forums
jQuery UI Widgets › Forums › Lists › ComboBox › Speed Problem
Tagged: combobox speed
This topic contains 3 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 2 months ago.
-
AuthorSpeed Problem Posts
-
Welcome from France,
I have 2 questions about the ComboBox component :
1) On my server I use Asp.Net WebApi and the average response is about 5 to 10 milliseconds but my combobox’s filling costs 10 seconds !
Here is my client side code :$("#jqxListes").on('select', function (event) { if (event.args) { var item = event.args.item; if (item) { var sourceTitres = { datatype: "json", datafields: [ { name: 'TitreId' }, { name: 'Libelle' } ], //url: '/home/GetTitres/' + item.value, url: '/api/getTitres/' + item.value, async: false }; var dataAdapterTitres = new $.jqx.dataAdapter(sourceTitres); var _StopWatch = new StopWatch(); _StopWatch.start(); $("#jqxTitres").jqxComboBox({ selectedIndex: 0, source: dataAdapterTitres, displayMember: "Libelle", valueMember: "TitreId", width: 200, height: 25, autoComplete: false, remoteAutoComplete: false }); _StopWatch.stop(); alert(_StopWatch.duration()); } } });
2) How can I have a basic combobox without ability to change the component’s choices ?
Thank you for your help.
Fernando.
Hi fernando60,
1. The provided code is insufficient for testing your case or reproducing an issue. We are also now aware how to achieve a loading time of 10 seconds. For example – 2000 items are loaded within < 1s - http://jsfiddle.net/tu214794/
2. The combobox is a widget which allows changing the selected item so it’s not possible to turn off it’s basic feature.Best Regards,
Peter StoevHi Peter,
Thank you very much for your incredibly rapid answers !
1) You’re right it’s not a JQwidgets’ problem
The problem was in my c# code. I put a stopwatch before the return Json(…).
For an obsure reason the Json function didn’t take care about the lazy properties on my Entity Framework classes and create an uselessly big answer.2) Don’t you know a trick to allow me to change the combobox in a readonly one ?
Best Regards.
Fernando.
Hi Fernando,
If you need readonly combobox, may be you may try jqxDropDownList. It’s basically the same widget, but without Input field.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.