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

Problems with RequiredFieldValidators within an Ajax loaded ASCX

3 Answers 79 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 22 Mar 2013, 02:45 PM
I can see there are some problems with the validators but so far I haven't found exactly my scenario.
I've based my code on the example  http://demos.telerik.com/aspnet-ajax/ajax/examples/common/loadingusercontrols/defaultcs.aspx

I have a FormTemplate popup within a RadGrid.  On that template I have one RadAjaxPanel containing a RadComboBox and another RadAjaxPanel occupying a tab in a RadTabStrip.  The first tab is always shown.  The second is for displaying an ASCX that may or may not be shown.

When I select certain values of the combobox, its SelectedIndexChanged event loads and sets up an ASCX on the second tab.  Everything is working properly except that when I hit the submit button on the FormTemplate itself, the ASCX Required Field Validators never fire.  (Even though I've accessed and enabled them directly in the SelectedIndexChanged event.  I know they're there.)

I have my RadAjaxManager set up as follows:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadComboBox1">
                <UpdatedControls >
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />                  
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Also it appears so far that although the control is loaded I cannot access it as usual in the RadGrid's InsertCommand e.item FindControl.

Suggestions?

3 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 27 Mar 2013, 12:19 PM
Hi Boris,

Could you please provide us with your code declaration and the related code behind in order to investigate the issue further? I would suggest you to check out the following help topic which describes how to ajaxify controls wrapped in RadAjaxPanel and added to RadAjaxManager settings .

All the best,
Kostadin
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
Boris
Top achievements
Rank 1
answered on 02 Apr 2013, 12:38 PM
Let me get back to you.  I need to give this some more thought.  I may have to submit a formal ticket for this one.  

(And as usual the current code is probably too complex and proprietary to hand out.  I'll try to come up with a demo.)
0
Boris
Top achievements
Rank 1
answered on 04 Apr 2013, 07:04 PM
My apologies to one and all.

After Re-reading The Fine Manual I believe my main mistake was having RadAjaxPanels in there in the first place. 

It looks like everything is behaving normally now with only a RadAjaxManager.

Thanks.
Tags
Ajax
Asked by
Boris
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Boris
Top achievements
Rank 1
Share this question
or