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

[Solved] Hidden controls loadondemand from web service not working when made visible

4 Answers 215 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Michael Von Foerster
Top achievements
Rank 1
Michael Von Foerster asked on 02 Feb 2008, 01:20 AM
Hello,

I have a user control that contains a promethus combobox that is load on demand from a web service.

The control is on the page initially, but in a hidden panel (so not rendered)

I then set the panel visible during a RadAjaxManager postback.

This shows the user control, but the drop down does not work at all.

Is there any work around to this situation, even if it is as ugly as registering javascript during the ajax callback?

I noticed that the following javascript is rendered for the combo's in the user controls that are intially visible, but is not rendered for the combo's in the user controls made visible during the ajax postback. (this is from the rendered JS not the view source of the page)

WebForm_InitCallback();Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadComboBox, {"_dropDownWidth":0,"_showDropDownOnTextboxClick":false,"_skin":"Office2007","_uniqueId":"ctl00$ContentPlaceHolder1$RetailComponentControl1$ddlFrom","allowCustomText":true,"clientStateFieldID":"ctl00_ContentPlaceHolder1_RetailComponentControl1_ddlFrom_ClientState","collapseAnimation":"{\"type\":12,\"duration\":200}","enableLoadOnDemand":true,"itemData":[],"text":"","value":"","webServiceSettings":"{\"path\":\"/CallbackWebServices/ComboBoxLists.asmx\",\"method\":\"AirportList\"}"}, {"itemsRequesting":itemRequesting}, null, $get("ctl00_ContentPlaceHolder1_RetailComponentControl1_ddlFrom"));
});

Could I just manually add this and make it work?

4 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 04 Feb 2008, 12:40 PM
Hello Michael Von Foerster,

I tried to reproduce the problem at our side, but to no avail. Is it acceptable for you to isolate the issue in a small and running project for us and attach the files to a new support thread? We will test your project locally and try to find a working solution for you.

Thanks for your time.

Expecting your reply,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael Von Foerster
Top achievements
Rank 1
answered on 04 Feb 2008, 03:18 PM
When I have time I will submit an isolated case. However, using the external streamer method with the non prometheus control, I was able to get the functionality I desired.

Thanks.
0
Martin
Top achievements
Rank 1
answered on 17 Mar 2008, 04:54 PM
I am getting the same exact issue with the same exact error.

firebug is telling me that:

WebForm_InitCallback is not defined

and it recalls the same line as the posters:

WebForm_InitCallback();Sys.Application.add_init(function() {
1324 $create(Telerik.Web.UI.RadComboBox, {"_dropDownWidth":0,"_height":0,"_skin":"NextGen","_text":"Action","_uniqueId":"ctl00$ctl00$ContentPlaceHolderBase$ContentPlaceHolder1$LetterLibrary$dgItemList$ctl02$libraryActionList","_value":"","_virtualScroll":false,"clientStateFieldID":"ctl00_ctl00_ContentPlaceHolderBase_ContentPlaceHolder1_LetterLibrary_dgItemList_ctl02_libraryActionList_ClientState","collapseAnimation":"{\"type\":12,\"duration\":200}","itemData":[{"value":"","selected":true,"enabled":true},{"value":"","selected":false,"enabled":true},{"value":"","selected":false,"enabled":true},{"value":"","selected":false,"enabled":true}],"selectedIndex":0}, null, null, $get("ctl00_ctl00_ContentPlaceHolderBase_ContentPlaceHolder1_LetterLibrary_dgItemList_ctl02_libraryActionList"));
1325});

Marty
0
Martin
Top achievements
Rank 1
answered on 18 Mar 2008, 03:46 PM

For performance reasons, our architecture is set up such that is loads <script src="/WebResource.axd ...> at the bottom of the page.

The script that contains
WebForm_InitCallback  gets loaded after the call. Resulting in the function not being defined.

Is there any way to get  the WebForm_InitCallback  call to wait until the page is fully loaded  before making its call?

Martin Middelmann

Tags
ComboBox
Asked by
Michael Von Foerster
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Michael Von Foerster
Top achievements
Rank 1
Martin
Top achievements
Rank 1
Share this question
or