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

Related Combo Boxes with Items Requested

4 Answers 91 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Shane
Top achievements
Rank 2
Shane asked on 25 Feb 2010, 02:45 PM
Hi

I am using LoadOnDemand and therefore the ItemsRequested. However this is causing problems in when one combo depends on another. The problem I am having is a user selects a value from combobox1 and then goes to combobox2. Combobox2 fires the ItemsRequested (but there aren't many items / user scrolls to end of the list) so e.EndOfItems is set to true. This means the ItemsRequested is no longer fired if the user then changes combobox1.

Whilst I'm am handling the SelectedIndexChanged event of combobox1, nothing I do seems to enable the ItemsRequested on Combobox2. 

Regards,
Shane

4 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 25 Feb 2010, 03:39 PM
I believe this demo should be of help to you.


It uses the LoadOnDemand approach. It populates the dependent comboboxes using client-side methods. 

I hope that helps.
0
Shane
Top achievements
Rank 2
answered on 25 Feb 2010, 04:16 PM
Thanks for your reply but I had checked this example before posting and I don't believe the demo is of help. That demo fires the ItemRequested for the related combo using the client side  combo.requestItems when the first combos selected index changes. this is all well and good just like my current solution until the related combobox sets the EndOfItems to true in the ItemRequested, as once this is set the ItemRequested event is no longer fired, thats my point.

So how do I reset the EndOfItems? or allow the ItemsRequested event to be refired once it has been disabled through the EndOfItems.


0
Shane
Top achievements
Rank 2
answered on 25 Feb 2010, 04:36 PM
It works in an ajax panel i'll just use that.

Cheers,
Shane
0
Simon
Telerik team
answered on 01 Mar 2010, 12:24 PM
Hi Shane,

You can use set_endOfItems(value) whenever you need to force the RadComboBox to load new Items. In your case, this can happen prior to calling the requestItems of the respective RCB.

Kind regards,
Simon
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
Shane
Top achievements
Rank 2
Answers by
robertw102
Top achievements
Rank 1
Shane
Top achievements
Rank 2
Simon
Telerik team
Share this question
or