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

Ajax refresh of RadComboBox

6 Answers 410 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 13 Feb 2008, 10:35 PM
I cannot see to figure out how to force a RadComboBox to requery for its list of items client-side.

One solution I tried was to surround the RadComboBox with a RadAjaxPanel (by the way when I do that the VS parser claims that RadComoBox is not a known element even though the solution compiles and runs fine.). In addition, I wired up the ItemsRequested event to populate the control. Then on the client side I call something like:
var combo = $find("<%=this.MySpiffyCombo.ClientID %>"); 
combo.requestItems(); 
 

Another solution I tried was to use RadAjaxManager (which would be my preferred choice) where the AjaxControlID on the AjaxSetting and its only AjaxUpdatedControl item's ControlID are both set to the RadComboBox. Then on the client I tried:
var ajaxManager= $find("<%=this.RadAjaxManager1.ClientID %>"); 
ajaxManager.ajaxRequest("foo"); 

Which did not fire on the server. Then I tried:
var ajaxManager = $find("<%=this.RadAjaxManager1.ClientID %>"); 
ajaxManager.ajaxRequestWithTarget("<%=this.MySpiffyCombo.UniqueID %""");  

I also tried wiring up the AjaxRequest event on the RadAjaxManager and again it did not fire.

What am I missing here? What is the Hoyle technique for ajax-ifying a RadComboBox and forcing a ajax refresh of its items?

6 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 14 Feb 2008, 03:08 PM
Hi Thomas,

Please, check out the following online demo on the matter: Load-On-Demand.

I hope it is helpful.

Regards,
Simeon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Thomas
Top achievements
Rank 1
answered on 14 Feb 2008, 06:20 PM
I wasn't actually trying to setup load on demand. I simply wanted the ability to fire an ajax update of the combobox should certain events occur on the page. However, are you suggesting that the only way to actually do that is with load on demand enabled?
0
Simon
Telerik team
answered on 15 Feb 2008, 04:34 PM
Hi Thomas,

Please, find attached a sample project which demonstrates the approach you need. You should note that the RadAjaxManager updates the RadComboBox.

For more information on how RadAjaxManager works, please refer to the following help article - AJAX Manager.

I hope this information helps.

All the best,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kiran
Top achievements
Rank 1
answered on 05 Jun 2014, 02:18 PM
I have .aspx page which contains Rad Ajax manager and this page contains two tabs. User controls(.ascx) are used for the Tabs.
I have radComboBox in user control (and Radajaxmanger in .aspx file). How can I refresh this combobox from client side?
0
Shinu
Top achievements
Rank 1
answered on 06 Jun 2014, 04:50 AM
Hi Kiran,

Please have a look into the following forum thread which discuss about the same scenario.

Ajax with RadTabStrip, RadMultiPage and UserControls
update/rebind RadPageView from another RadPageView

Thanks,
Shinu.
0
jroughgarden
Top achievements
Rank 1
answered on 10 Jun 2019, 03:54 PM

I was able to get the RadComboBox to refresh by re-binding the control. I had to do this after the user entered a new entry not already in the list, and I needed to save it back to the DB.

rcbPersons.DataSource = SqlDataSource1;
rcbPersons.DataBind();
rcbPersons.SelectedIndex = newId;                //newId is the Id of the newly added record.  

Tags
ComboBox
Asked by
Thomas
Top achievements
Rank 1
Answers by
Simon
Telerik team
Thomas
Top achievements
Rank 1
Kiran
Top achievements
Rank 1
Shinu
Top achievements
Rank 1
jroughgarden
Top achievements
Rank 1
Share this question
or