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

Load On Demand, Empty combo

3 Answers 91 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jocelyn
Top achievements
Rank 1
Jocelyn asked on 23 Apr 2012, 03:41 PM
Hi,

I am trying to understand why my combo box is always empty in the ItemRequested event eventhough I have some items in my Combo... My Event is similair to the load on demand demo. My combo works fine for the client, my problem is on the server, it is empty.

So why?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Apr 2012, 06:47 AM
Hi Jocelyn,

I tried to reproduce your issue, but no avail. Here is the sample code that I tried which worked as expected.

ASPX:
<telerik:RadComboBox ID="RadComboBox3" runat="server" Width="250px" Height="150px" EmptyMessage="Select a Company" EnableLoadOnDemand="True" ShowMoreResultsBox="true"EnableVirtualScrolling="true" OnItemsRequested="RadComboBox3_ItemsRequested">
    <Items>
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
       <telerik:RadComboBoxItem Text="RadComboBoxItem" />
    </Items>
</telerik:RadComboBox>

C#:
protected void RadComboBox3_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
    {
        int s = RadComboBox3.Items.Count;
    }

Please provide your code if it doesn't helps.

Thanks,
Shinu.
0
Accepted
Kalina
Telerik team
answered on 24 Apr 2012, 07:11 AM
Hello Jocelyn,

The RadComboBox items loaded on demand using the ItemsRequested event handler or WebService do not exist on the server.
Please find more details about this topic at this help article.

All the best,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jocelyn
Top achievements
Rank 1
answered on 24 Apr 2012, 08:37 PM
I'll see what I can do client-side

Thank you Kalina.
Tags
ComboBox
Asked by
Jocelyn
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Kalina
Telerik team
Jocelyn
Top achievements
Rank 1
Share this question
or