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

rad ajax panel nightmare

4 Answers 87 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
esra
Top achievements
Rank 1
esra asked on 16 Feb 2011, 12:13 PM
I was using asp update panel before but because of some problems with telerik components i changed update panel with rad ajax panel... now i have troble with client side validators

they are not working correctly..please someone help...how will i validate my page client-side...i've tried many senerios...but nothing worked..

i saw web service validation but how can i apply this to any control..demo is not clear????

4 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 18 Feb 2011, 02:10 PM
Hello Esra,

Could you please elaborate a bit more on your Ajax setting and Validation settings? Do the validator controls added to the RadAjaxPanel?

Greetings,
Maria Ilieva
the Telerik team

0
Pako
Top achievements
Rank 1
answered on 22 Mar 2011, 08:18 AM

Hi,

I'm having exactly the same problem: validators on client side does not seem to work correctly. I have some data inside RadAjaxPanel, there are two labels, that should display some string value, and there is one hidden field, that holds information, whether element in first field was selected.

<telerik:RadAjaxPanel ID="DetailsSection" runat="server" LoadingPanelID="loadingPanel">
    <div class="DetailBox>
        <div class="DetailHeader">
            <div class="DetailHeaderTitle">
                Details 
            </div>
        </div>
        <div class="DetailContent">
            <ul>
                <li>
                    <div class="DetailLabel">
                        *Name:
                    </div>
                    <div class="DetailText">
                        <div class="BreakWordDiv">
                            <asp:Label ID="lblName" runat="server">
                            <%# GetTextValue(Me.Name)%>
                            </asp:Label>
                            <asp:TextBox ID="hdnName" runat="server" Style="display: none" />
                            <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="hdnName"
                                SetFocusOnError="false" ErrorMessage="Name is required before saving"
                                ValidationGroup="SaveValidationGroup">
                            *
                            </asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="DetailTextInfo">
                        <asp:LinkButton Text="Select" ID="linkName" runat="server" OnClientClick="ShowNameSelect(); return false;" />
                    </div>
                </li>
                <li>
                    <div class="DetailLabel">
                        *Second label:
                    </div>
                    <div class="DetailText">
                        <div class="BreakWordDiv">
                            <asp:Label ID="lblSecond" runat="server">
                            <%# GetTextValue(Me.SecondValue)%>
                            </asp:Label>
                        </div>
                    </div>
                    <div class="DetailTextInfo">
                        <asp:LinkButton Text="Select" ID="linkSecond" runat="server" OnClientClick="ShowSelect(); return false;" />
                    </div>
                </li>
            </ul>
        </div>
    </div>
</telerik:RadAjaxPanel>
Now, when I first go to that page and press save button, that causes validation (this button is outside RadAjaxPanel) everything works fine, red asterisk is displayed as there was no name value selected. If I select name, everything works fine. But if I would go to that page, then select value for second field (which has no validators) and then pressed Save button, client side validation does not give me an error message, instead postback is triggered and then server side validation returns an error, that name field was empty.

So: client side validation seems broken after I select second value (which causes RadAjaxManager to create ajax postback for presented panel), but server side validation still seems to work OK.

Any idea why client side validation is not working? Is there any way to fix this behavior? Any workaround?

Thanks in advance,

Pako

0
Maria Ilieva
Telerik team
answered on 24 Mar 2011, 04:24 PM
Hello Pako,

Could I kindly ask you to open a regular support ticket and send us sample runnable application which demonstrates the described behavior? Thus we will be able to debug it locally and advise you further on this problem.


Best wishes,
Maria Ilieva
the Telerik team

0
Pako
Top achievements
Rank 1
answered on 25 Mar 2011, 02:29 PM

I tried to create sample application to show you, but with no success. I will try to do it later again, and if I'll succeed, I'll post support ticket.

Thanks,

Pako

Tags
Ajax
Asked by
esra
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Pako
Top achievements
Rank 1
Share this question
or