I have a form with multiple fields to make a database request.
Once the user press the submit button, the request is proceed and if the result list count is >0 I display a pannel containing a webcombo, setting combo datasource to the list of results.
As sometimes the result list can send more than 500000 rows, I enable Combo AJAX checkbox (design time) to load data on demand.
But since I checked it, I have s trange problem :
- First submit -> ok
- Second submit (changing a request field) ->
- if 2nd result list count < 1st result list : I see the first results instead of the corrects ones
- if 2nd list count > 1st results : i see the first N rows as beeing the first request answer and the others lines as beeing the new results
- Third submit (witjhout changing any request field) : the new result list is correctly displayed.
Does anyone know if this is an AJAX webcombo bug ? or maybe do I need to "reset" the Ajax view of the combo by calling a method ? How can I change properly the datasource of the ajax enabled webcombo between two postback of my page ?
Thanks in advance for your tips guys.
Reply from Infragistics support :
To resolve the issue, just you need to clear the rows of the WebCombo before assigning the DataSource using “WebCombo1.Rows.Clear();”.
Thanks to Chandradeep for the answer. Wrote here for others that should have the same question when beginning with Ajax enabled webcombos.
The sample program (infragistics posts can only link one file ?)
I add a sample program to demonstrate the problem.
Try to launch the web application.
List A should be loaded into the webcombo (ref1 to ref10). If you scroll you will load 10 more rows (ref11 to ref20)
Press ListB button once.
Show the drop down list : surprise, the 20 ref from listA are still shown.
Press Once more : the 20 ref from list A have been replaced by ref from list B (starting by "Bref")
If you press A once, still 20 Bref are shown but scroll one time, the ten next row will be then ref from liste A, so the first 20 rows are from B, the 10 next from A.
Press A button once more, now you have 30 rows from A.