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

RadWindow with UserControl in Content Template

1 Answer 184 Views
Window
This is a migrated thread and some comments may be shown as answers.
Venkata Rajesh
Top achievements
Rank 1
Venkata Rajesh asked on 06 Aug 2012, 02:44 PM
I have a user control that is displayed via the content template of RadWindow .

The user control has a textbox with a requiredFieldValidator that doesnt get fired on client side when a button is clicked in the same user control.

Sample code: 

<telerik:RadWindow ID="sample" runat="server"
        Title="My Sample" Modal="true" Width="800px" Height ="720px"  >
        <ContentTemplate>
            <UC1:Sample runat="server" ID="sampleControl" />
        </ContentTemplate>
    </telerik:RadWindow>
 
-- User control contents --
<div>
 <telerik:RadTextBox ID="txtTest" runat="server" CausesValidation="true" />
                        <asp:RequiredFieldValidator ID="rfv" ControlToValidate="txtTest" runat="server" Display="Dynamic"
                        ErrorMessage="*" Text="*" />
</div>
<telerik:RadButton ID="radButton" runat="server" Text="Click me" CausesValidation="true" />

This happens when i make the an partial postback using ajax rather than a complete postback.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 09 Aug 2012, 07:12 AM
Hello Venkata,

This code appears to be working fine with my sample (which you can find attached, along with a video from my test). I suggest you compare it with your setup and try to find the difference that is causing the problem.

What I can advise is that you use the ValidationGroup property of the textbox, button and validator to make sure they are executed together and do not affect the rest of the page. More information about using it is available in the net, e.g. here.


Greetings,
Marin Bratanov
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.
Tags
Window
Asked by
Venkata Rajesh
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or