rad ajax panel nightmare

5 posts, 0 answers
  1. esra
    esra avatar
    8 posts
    Member since:
    Feb 2011

    Posted 16 Feb 2011 Link to this post

    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????
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 18 Feb 2011 Link to this post

    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

  3. Pako
    Pako avatar
    16 posts
    Member since:
    Oct 2010

    Posted 22 Mar 2011 Link to this post

    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

  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 24 Mar 2011 Link to this post

    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

  5. Pako
    Pako avatar
    16 posts
    Member since:
    Oct 2010

    Posted 25 Mar 2011 Link to this post

    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

Back to Top