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

Cannot get sub control to ajaxify

5 Answers 48 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 30 Jun 2010, 02:21 PM
Hi,
I am trying out ASP.NET Ajax RadControls and have an issue with ajaxifying a specific control on a sub ASCX control.

I have ajaxified the buttons on the main page ok. But no matter what I have tried on the sub ASCX i cannot get the radcombobox to fire the onselectedindexchanged event.

The heirarchy is as follows...
- Default.aspx
    - Content_RegistrationLookup.ascx
        - Sub_VehicleBrowser.ascx
            - RadComboBox_Make (this is the control I wish to ajaxify to update RadComboBox_Model)

So there are two nested ascx controls. I have tried the following...

 

  • Putting this on the Page_Load event of Sub_VehicleBrowser.ascx to add the ajax setting to the main page manager

RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(RadComboBox_Make, RadComboBox_Model, RadAjaxLoadingPanel1)

 

  • Using a RadAjaxManagerProxy with the same setting as coded above in the Sub_VehicleBrowser.ascx control
  • Wrapping the RadComboBoxes in Panels and using the Panels as the update controls in RadAjaxManager

The entire visual studio 2010 project so far can be downloaded here http://www.ignitioncarparts.co.uk/cpc.zip.

I would be very grateful for any help.

Thanks,
Lee

5 Answers, 1 is accepted

Sort by
0
SamJ
Top achievements
Rank 1
answered on 01 Jul 2010, 07:31 AM
Hi Lee,

What RadAjax does is to turn the regular postbacks into callbacks. Therefore the RadComboBox SelectedIndex change should fire either with ajax enabled or disabled.
Can you confirm you have set the AutoPostBack property of the RadComboBox control to true?

Thanks,
SamJ
0
Lee
Top achievements
Rank 1
answered on 01 Jul 2010, 09:17 AM
Thanks for your reply. I have tried all the scenarios as mentioned with the autopostback set to true and also set to false.

When set to false nothing happens, when set to true the page Content_RegistrationLookup.ascx does a full postback returning a blank white page.

Lee
0
SamJ
Top achievements
Rank 1
answered on 01 Jul 2010, 10:24 AM
Please excuse me if I was not clear enough. In order the RadComboBox to initiate postback as soon as its selection is changed the AutoPostBack property should be set to true. Otherwise it is expected no postback to happen and the server event not to fire. And to turn the postback in callback you can use RadAjax. But before ajaxifying the page you should first make sure it works as expected without ajax, but with regular postback.
From then on, if ajaxified controls still postback, you can check this article for resolution:
http://www.telerik.com/help/aspnet-ajax/ajxcontrolstillpostbacks.html

If it does not help, send a sample code illustrating your true scenario and the issue.

Regards,
SamJ



0
Lee
Top achievements
Rank 1
answered on 03 Jul 2010, 08:40 AM
Setting AutoPostBack to True causes the event to fire, but as a full postback, not an ajaxified one.
The source code can be found at http://www.ignitioncarparts.co.uk/cpc.zip.

Regards,
Lee
0
Tsvetoslav
Telerik team
answered on 05 Jul 2010, 02:18 PM
Hello Lee,

I have responded to your support ticket. Plase, close the current forum thread and leave the discussion to the formal ticket one.

For the sake of helping other people that might encounter a similar problem, the solution is to set the AutoPostBack property to true and add the necessary ajax settings.

Regards,
Tsvetoslav
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
Ajax
Asked by
Lee
Top achievements
Rank 1
Answers by
SamJ
Top achievements
Rank 1
Lee
Top achievements
Rank 1
Tsvetoslav
Telerik team
Share this question
or