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

Error using Slider

2 Answers 24 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Adam Heeg
Top achievements
Rank 1
Adam Heeg asked on 27 Sep 2011, 02:50 PM
Error:  Sys.WebForms.PageRequestManagerParserErrorException:

I have a page which I want to be able to do 2 things, but so far I get the error above when I try to enable both of them. 

First I have my sliding pane which works just fine and all is good.  Inside the pane is a control with a button.  This button works fine as well (and it works on other pages too).  The problem is when I add code to have the sliding pane open through code (posted below) I get the error mentioned above and it will not work.  How can I fix this?  come more details about my setup.

Code to open pane:

 

 

 

<telerik:RadScriptBlock runat="server">
                <script
                    type="text/javascript"
                    language="javascript">
                    function pageLoaded(sender, args) {
                        var settings = sender._postBackSettings;
                        if (settings != null) {
                            var postbackControlID = new String(settings.sourceElement.id);
                            if (postbackControlID.toUpperCase().indexOf("PRIORITYLINKBUTTON", 0) > 0) {
                                var slidingZone = $find("<%= RadSlidingZone1.ClientID %>");
                                if (slidingZone != null) {
                                    var prioritySlidingPane = slidingZone.getPaneById("<%= RightSlidePane.ClientID %>");
                                    slidingZone.expandPane("<%= RightSlidePane.ClientID %>");
                                }
                            }
                        }
                    }
                </script>
<script
    type="text/javascript"
    language="javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded)
</script>

Code for Ajax Manager - this is the code which A) makes the pane correctly slide out when a specified item is selected and B) causes the error being thrown when the button is clicked.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="CollaborateDiscussionPanel">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="CollaborateDiscussionPanel"  />
                <telerik:AjaxUpdatedControl ControlID="PManagerSummary1" />
            </UpdatedControls
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="PManagerSummary1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="PManagerSummary1" />
            </UpdatedControls
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
PManagerSummary1 is the user control which has the button to be clicked and is the control in the sliding pane which slides out.

2 Answers, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 30 Sep 2011, 09:58 AM
Hello Adam,

Judging by the encountered error, the problem is caused most probably by the way you have Ajaxifyed the RadSplitter. Please refer to this help article, as there are specifics that you should be aware of when updating the RadSplitter with RadAjaxManager.

Note that at the current state of affairs I am mostly guessing as to what your setup is. If you are still experiencing difficulties after checking the provided information, please open a regular support ticket and send us a sample, runnable project that displays your issue so that we can examine it locally and provide a more to the point answer.

Best wishes,
Slav
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
0
Adam Heeg
Top achievements
Rank 1
answered on 30 Sep 2011, 12:41 PM
Thank you for the link and response.  I resolved the issue by handling the opening of the pane on the server during post back.  For anyone elses references the code is below.
RadSlidingZone1.ExpandedPaneId = "";
string name = Page.Request.Params.Get("__EVENTTARGET");
if (!string.IsNullOrEmpty(name))
{
    Control c = Page.FindControl(name);
    if (c is LinkButton)
    {
        RadSlidingZone1.ExpandedPaneId = "PrioritySummarySlider";
    }
}


Thanks!
Tags
Slider
Asked by
Adam Heeg
Top achievements
Rank 1
Answers by
Slav
Telerik team
Adam Heeg
Top achievements
Rank 1
Share this question
or