RadMultiPage RenderSelectedPageOnly="True" and JavaScript Issues

2 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 09 Feb 2011 Link to this post


    I'm using the RadTabStrip and RadMultiPage combo with the multipage having the RenderSelectedPageOnly property set to true.  In the current page, the page has a JavaScript method that is the client validation function for a CustomValidator control.  For some reason, when this property is true, that function can't be found.  But with this property as false, the page works as expected; the client validation function runs when the form is being submitted.  The JS function is in the content of the RadPageView that's displayed.  It looks something like this:

    <tel:RadPageView runat="server">
    .. form ..
    <asp:CustomValidator runat="server" .. ClientValidationFunction="cv_Val" />

    <tel:RadScriptBlock runat="server">
    <script type="text/javascript">
    function cv_Val(sender, e) {
    //Function for client validation

    With RenderSelectedPageOnly to true, it says cv_Val does not exist.  Why is that?  What would be causing the error?

  2. Dimitar Terziev
    Dimitar Terziev avatar
    1266 posts

    Posted 14 Feb 2011 Link to this post

    Hi Brian,

    If you have RenderSelectedPageOnly property set to true, only the corresponding pageview of the selected tab will be rendered on the webpage. Thus if you click between node you have to make a full post-back in order to load all controls and scripts. I suspect that in your case you don't make a full page post-back, RadScriptBlock is not loaded properly and that's why you get the JS error.

    Dimitar Terziev
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top