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

RadSplitter: RadPane's ContentURL throws weird JS error

2 Answers 109 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Carlos Colell
Top achievements
Rank 1
Carlos Colell asked on 29 Apr 2008, 03:44 PM
Hi there,

I have a Splitter control, with two RadPane controls inside. The first one (left) contains a tree control, the second one (right) another Splitter (right/top) with a RadGrid and (right/bottom) an empty pane which ContentUrl should be updated. There is also an AjaxManager in the page. Both the tree and grid are subscribed to this RadAjaxManager control. My questions are:

  • Which control should I add to the AjaxManager if I want the (right/bottom) RadPane updated? Everything is connected in an Ajax scenario so if I don't mention this Pane, nothing happens, but no errors occur either. I can see, debugging my code, that the ContentURL property is updated, but I see no changes. I guess it is because of Ajax.
  • I have tried to add the main Splitter, the splitter in the right side, and the (right/bottom) Pane. The results are errors. Firefox says "Invalid JSON primitive: undefined". IE 7 says: "htmlfile: unknown runtime error", and it stops in this code line:

    function Sys$WebForms$PageRequestManager$_updatePanel(updatePanelElement, rendering) {  

 

        for (var updatePanelID in this._scriptDisposes) {  

            if (this._elementContains(updatePanelElement, document.getElementById(updatePanelID))) {  

                                var disposeScripts = this._scriptDisposes[updatePanelID];  

                for (var i = 0; i < disposeScripts.length; i++) {  

                    eval(disposeScripts[i]);  

                }  

 

                                delete this._scriptDisposes[updatePanelID];  

            }  

        }  

 

        this._destroyTree(updatePanelElement);  

 

                

updatePanelElement.innerHTML = rendering;  /* <-- ERROR */

    }  

 


Before using the ContentUrl protery of the RadPane showing a external page, I was using an IFrame tag, with runat="server", and I was updating its SRC attribute. The IFrame control was added to the AjaxManager and it worked perfectly. But I also had resizing problems and if I could use the same RadPane to show a page it'd be awesome.

If anyone has found a solution for this or has a clue on what's going on, it'd be much appreciated.

Thank you in advance!

2 Answers, 1 is accepted

Sort by
0
Carlos Colell
Top achievements
Rank 1
answered on 29 Apr 2008, 03:54 PM
Does RadAjaxPanel have anything to do with this?

I have tried to put a RadAjaxPanel surrounding the right SplitBar, and adding the RadAjaxPanel to RadAjaxManager. It does nothing. If I add the whole (right) SplitBar to the RadAjaxManager, the (right/bottom) pane is updated, but the (right/top) other one becomes blank... I know I am almost there, but not yet :( It is something about updating a control within a RadPane tag versus updating the RadPane itself (respecting the state of its sibling RadPanes).


0
Tsvetie
Telerik team
answered on 30 Apr 2008, 06:26 AM
Hi Carlos Colell,
I have already answered your support ticket with the same question, but I will give the information here as well, so that it is available to all, who might run into the same problem:

***

Even though you can specify a control in a RadPane as UpdatedControl in the AjaxSettings of the RadAjaxManager, you cannot specify the RadPane itself - you can read more about this here. That happens because the RadSplitter controls all its RadPanes, their resize operations, etc. I am not quite sure why you get errors when you update the RadSplitter of the RadPane you what to update, but in case you send us a running test project, demonstrating them, we will research what the problem is.

Generally, in case you do not want to update the whole splitter in order to update the ContentUrl of one of its panes, you will have to use the approach with the IFRAME - just set its width/height to 100%.

***

All the best,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Splitter
Asked by
Carlos Colell
Top achievements
Rank 1
Answers by
Carlos Colell
Top achievements
Rank 1
Tsvetie
Telerik team
Share this question
or