This is a migrated thread and some comments may be shown as answers.

ShowMoreResults/EnableVirtualScrolling issue

3 Answers 51 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Abinash
Top achievements
Rank 1
Abinash asked on 17 Nov 2008, 12:28 PM

Showmoreresults button(The arrow below the dropdown) is displaying value twice in a combobox.
The same issue is present in the following example as well.

http://demos.telerik.com/ASPNET/Prometheus/Combobox/Examples/PopulatingWithData/AutoCompleteSql/DefaultCS.aspx 
If we select some value for example 'Berglunds snabbköp' from the dropdown. After clicking  on Select button one value is present in the dropdown which is correct. Now if Showmoreresults button is clicked it will display the above value twice in dropdown.

Could you please tell some way of resoving this issue?

Also the EnableVirtualScrolling="true" is not working first time. After clicking on the Showmoreresults button or on writing something in the textbox  eventually scroll starts working i.e. is populating  data.
Any help would be highly appreciated.

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 18 Nov 2008, 02:13 PM
Hi Abinash,

You can resolve this issue by removing OnClientItemsRequesting event and using e.Text for the sql query instead of e.Context["CustomText"].ToString() in RadComboBox1_ItemsRequested event handler.
 
Regards,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Abinash
Top achievements
Rank 1
answered on 19 Nov 2008, 03:31 AM
Hi,
I have used e.Context["CustomText"].ToString() method instead of e.Text because while searching for an item with space it does not return correct value.

For example:
If the word typed is ala california, the e.Text will return value as  ala%20california and the dropdown will be empty.

Thanks,
Abinash
0
Yana
Telerik team
answered on 20 Nov 2008, 12:55 PM
Hello Abinash,

In that case I suggest you modify OnClientItemsRequesting method from the online example like this:

function OnClientItemsRequesting(sender,e)  
{  
    e.get_context().CustomText=sender.get_text();  
}  
 

and then use  e.Context["CustomText"].ToString() in the sql query.

All the best,
Yana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Abinash
Top achievements
Rank 1
Answers by
Yana
Telerik team
Abinash
Top achievements
Rank 1
Share this question
or