This is a migrated thread and some comments may be shown as answers.
RadSplitter and UpdatePanel / contenturl reload
9 Answers 362 Views
This is a migrated thread and some comments may be shown as answers.
kamiln
Top achievements
Rank 1
kamiln asked on 20 Jul 2007, 05:29 PM
Hi,

Perhaps I'm missing something but I can't seem to get my radsplitter to work with a updatepanel. In this example each time I click on the button that's in a upadatepanel (LeftPane) the ContentPane with reloads with the specified contenturl. Here is the code;
Server Side:
protected void UpdateButton_Click(object sender, EventArgs e)
        {
            DateTimeLabel1.Text = DateTime.Now.ToString();
            DateTimeLabel2.Text = DateTime.Now.ToString();
        }

Client Side:
<telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" Orientation="Horizontal" LiveResize="false" VisibleDuringInit="true" Skin="Vista">
    <telerik:RadPane ID="TopPane" runat="server" Height="145px" Scrolling="None" BorderWidth="0px">
        <uc2:RibbonBar ID="ribbonBar" runat="server" />
    </telerik:RadPane>
    <telerik:RadPane ID="Radpane6" runat="server" BorderWidth="0px" Scrolling="None">  
        <telerik:RadSplitter ID="NestedSplitter" runat="server" Height="100%" Width="100%" LiveResize="true" Skin="Vista" VisibleDuringInit="true">
            <telerik:RadPane ID="LeftPane" runat="server" CssClass="NavigationContentPanel" Width="220px" MinWidth="100" MaxWidth="400" Scrolling="Both" BorderWidth="0px">       
                <telerik:RadSplitter id="NestedLeftSplitter" runat="server" width="100%" height="100%" orientation="Horizontal" resizewithparentpane="false">
                    <telerik:RadPane id="LeftPanePanel" Height="23%" Scrolling="None" runat="server">
                        <uc1:LeftNavigation ID="LeftNavigation1" runat="server" />
                    </telerik:RadPane>
                    <telerik:RadSplitbar id="Radsplitbar4" runat="server" collapsemode="Forward" />
                    <telerik:radpane id="LeftPaneTree" Height="77%" runat="server">
                        <asp:UpdatePanel runat="server" id="UpdatePanel" updatemode="Conditional">
                        <Triggers>
                            <asp:AsyncPostBackTrigger controlid="UpdateButton2" eventname="Click" />
                        </Triggers>
                        <ContentTemplate>
                            <asp:Label runat="server" id="DateTimeLabel1" />
                            <asp:Button runat="server" id="UpdateButton1" onclick="UpdateButton_Click" text="Update" />              
                        </ContentTemplate>
                        </asp:UpdatePanel>
                        <asp:UpdatePanel runat="server" id="UpdatePanel1" updatemode="Conditional">          
                        <ContentTemplate>
                        <asp:Label runat="server" id="DateTimeLabel2" />
                        <asp:Button runat="server" UseSubmitBehavior="False" id="UpdateButton2" onclick="UpdateButton_Click" text="Update" />
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </telerik:radpane>

                </telerik:RadSplitter>
            </telerik:RadPane>  
            <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" />  
            <telerik:RadPane ID="ContentPane" runat="server" ContentUrl="Home.aspx" CssClass="mainContentPanel" BorderWidth="0px" Scrolling="Both">              
            </telerik:RadPane>  
            <telerik:RadPane ID="EndPane" runat="server" Width="24px" BorderWidth="0px" Scrolling="None" Locked="true">
                <uc3:SlidingPanel ID="SlidingPanel1" runat="server" />
            </telerik:RadPane>
        </telerik:RadSplitter>
    </telerik:RadPane>
    <telerik:RadPane ID="FooterPane" runat="server" Height="21px" Scrolling="None" BorderWidth="0px" Locked="true">
      
    </telerik:RadPane>
</telerik:RadSplitter>

9 Answers, 1 is accepted

Sort by
0
kamiln
Top achievements
Rank 1
answered on 20 Jul 2007, 07:14 PM

I also wanted to note that if I try the define the contenturl programatically ie.

  if (!this.scriptManager.IsInAsyncPostBack)
            {
                HttpCookie cookie = Request.Cookies["ContentPaneURL"];

                if (cookie != null)
                    this.ContentPane.ContentUrl = cookie.Value;
            }

The content pane still reloads

0
Valeri Hristov
Telerik team
answered on 23 Jul 2007, 02:22 PM
Hello kamiln,

I tried to reproduce the problem with the attached page, but to no avail. Am I missing something? Could you please send me a simple project which demonstrates the problem?

All the best,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Valeri Hristov
Telerik team
answered on 24 Jul 2007, 11:32 AM
Hello kamiln,

A colleague of mine just reminded me that I am using the latest internal build of RadSplitter, which appears to contain a fix for this bug. Please, find it attached. If you need a developer (production) build, please, open a new support ticket with account which has a valid product license and we will send you one.

Regards,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rycho
Top achievements
Rank 1
answered on 01 Oct 2007, 11:24 PM
I think I found the same problem but using standard (not Prometheus) RadAjaxManager. I have 2 splitters - first one updates the second one. When user clicks on the first one it should update (thru Ajax) page X on the second splitter (second splitter has a pane which loads page X thru ContentUrl property).

Every ajax callback page X reloads (effect is just like using command pane,SetContentUrl(X);) but as far as I'm concerned page X should not reload but only show changes, aren't I?

How can I get rid of this reloads?

Regards,
  Rycho
0
Tsvetie
Telerik team
answered on 05 Oct 2007, 11:38 AM
Hello Rycho,
I am not sure I understand your scenario completely, so in case I misunderstood it, please do correct me and provide detailed information on the case - your code would be really helpful in this situation.

I understand that you have 2 RadSplitter controls - lets say you have a button in one of the RadPanes of the first RadSplitter and you have set ContentUrl="X" for one of the RadPanes of the second RadSplitter. You have also configured the first RadSplitter to update the Second RadSplitter with help from the RadAjaxManager. When you click on the button in the first RadSplitter - the X page in the second RadSplitter is reloaded.

Actually this behavior is expected. Note that when you set the ContentUrl of the RadPane, an IFRAME element is added to that RadPane, and the page is opened in that IFRAME. You have configured your first RadSplitter to update the second - and respectively that IFRAME.  You have NOT configured your first RadSplitter to update just a few elements from the X page. That is why the X page is reloaded.

Sincerely yours,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rycho
Top achievements
Rank 1
answered on 05 Oct 2007, 12:14 PM
Yes, my scenario is exactly as you said but how can I update only some elements on page X while first splitter and also ajaxmanager don't know what X page would it be? Remember that page X i loaded dynamically thru ContentUrl property.

For now I use:

                        <radA:AjaxSetting AjaxControlID="LeftRadTreeView"
                            <UpdatedControls> 
                                <radA:AjaxUpdatedControl ControlID="ContentRadSplitter" LoadingPanelID="DefaultRadAjaxLoadingPanel" /> 
                            </UpdatedControls> 
                        </radA:AjaxSetting> 

Is there any trick to achieve the point you described?

Rycho

0
Tsvetie
Telerik team
answered on 08 Oct 2007, 02:00 PM
Hello Rycho,
As you understand, the task that you are after is not that easy, because you are dealing with two separate pages. Please have a look the following procedure:
  1. Let us assume that you have a button on the parent page (the one containing the RadSplitter) and that you want to update a Label from page X once you push that button.
  2. In page X, add RadAjaxManager.
  3. Configure the RadAjaxManager to update the Label, when an ajax request has been initiated by the RadAjaxManager.
  4. Define a javascript function, that gets a reference to the RadAjaxManager and initiates an ajax request by means of the manager's AjaxRequest method.
  5. In the code-behind of the X page, handle the RaisePostBackEvent and update the Label.
  6. In the main page, define a function that obtains a reference to the X page, and executes the function, defined in it.

I have prepared a sample application that demonstrated this approach - please find it attached.

Best wishes,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Matthew
Top achievements
Rank 1
answered on 15 Nov 2007, 10:01 AM
Does this approach work on Q2 2007 i.e not Prometheus ?
0
Tsvetie
Telerik team
answered on 15 Nov 2007, 11:06 AM
Hello Matthew,
Yes, the approach is the same - the Referencing content page in a splitter pane from the parent page and vice versa article will help you get the desired result with the old RadSplitter control

All the best,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Asked by
kamiln
Top achievements
Rank 1
Answers by
kamiln
Top achievements
Rank 1
Valeri Hristov
Telerik team
Rycho
Top achievements
Rank 1
Tsvetie
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or