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

RadMultiPage RenderSelectedPageOnly="True" and JavaScript Issues

1 Answer 219 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 09 Feb 2011, 06:54 PM
Hello,

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
}
</script>
</tel:RadScriptBlock>
</tel:RadPageView>

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

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 14 Feb 2011, 02:38 PM
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.

Regards,
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.
Tags
TabStrip
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or