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

problem with AsyncPostBackTrigger

4 Answers 148 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 16 Oct 2008, 03:51 PM
I am using a RadTreeView to update a panel that contains a 3rd part Charting control (I am using flow charts and org charts which, I believe, RadChart doesn't yet do). If I do not use an AsyncPostBackTrigger, everything seems to work just fine. The chart control, along with all the other detail information loads correctly when the RadTreeView node is clicked and the OnClick event I defined in the codebehind file is run on the server. 

But, if I  add an AsyncPostBackTrigger, as described in this post:


I get this error:
Microsoft JScript runtime error: Object expected

and the area of code that is highlighted in the debugger is this bit:

<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> 
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /> 
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTE0NTg2NDI1OA9kFgICAw9kFgICAw8UKwACFCsAAhQrAAIPFgIeF0VuYWJsZUFqYXhTa2luUmVuZGVyaW5naGQQFgFmFgEUKwACZGQPFgFmFgEFc1RlbGVyaWsuV2ViLlVJLlJhZFRyZWVOb2RlLCBUZWxlcmlrLldlYi5VSSwgVmVyc2lvbj0yMDA4LjIuODI2LjIwLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTEyMWZhZTc4MTY1YmEzZDRkZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFDFJhZFRyZWVWaWV3MUnSvyNIwNtgpsSxyXE70wJc5PJd" /> 
 
 

The yellow highlighting, indicating the location of the error, starts between the first and second "d" in the word "hidden" in the second line of code, and it extends to halfway through the large encrypted value in the third line. 

If I remove the chart control from the page, then there is no error. If I remove this code:
            <Triggers> 
                <asp:AsyncPostBackTrigger ControlID="RadTreeView1" EventName="NodeClick" /> 
            </Triggers> 
 

...there is no error either.

Here is the definition of my RadTreeView control:
        <telerik:RadTreeView ID="RadTreeView1" runat="server" Height="600px" Width="400px"  
            OnClientNodePopulating="nodePopulating" LoadingStatusPosition="BelowNodeText" OnNodeClick="RadTreeView1_NodeClick" > 
            <WebServiceSettings Path="WebServiceProxy.asmx" Method="GetTreeViewNodes" /> 
            <CollapseAnimation Duration="100" Type="OutQuint" /> 
            <ExpandAnimation Duration="100" /> 
            <Nodes> 
                <telerik:RadTreeNode runat="server" Checkable="False" Text="MyRootNode" Value="0|0" ExpandMode="WebService"
                </telerik:RadTreeNode> 
            </Nodes> 
        </telerik:RadTreeView>  

I am not sure how to proceed in debugging this.

Does anyone have any suggestions as to what this might be?
Thanks 

PS: I get this error if I use telerik:RadAjaxManger or UpdatePanel. Both give the same results. UGH. How frustrating to come this far with this, and now be shut down. 

4 Answers, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 17 Oct 2008, 11:57 AM
Hi Roger,

I just created a very simple application trying to reproduce the problem you explained, but to no avail. Please, find it attached. Can you please, check if I am missing something different than the 3rd party chart control?

Kind regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Roger
Top achievements
Rank 1
answered on 17 Oct 2008, 02:52 PM
Thank you for your attention to this matter.

Your example seems good to me. I can get my code to work as well, if I remove the chart control. All the other controls (text boxes, buttons, etc) in the Update Panel seem to work just fine. The chart control is rather sophisticated, and has clickable nodes and other client side functionality that complicates the whole environment.

I will post, again the part of the page that is erroring, with the text in yellow that is highlighted in my IDE. It is odd that partial lines are highlighted, so I thought I would reproduce it here, in case that gives any clue as to what the underlying problem is. The yellow text EXACTLY replicates the highlighting that I see in Visual Studio.

 

<form name="form1" method="post" action="explore.aspx" id="form1">

 

<

 

div>

 

<

 

input type="hidden" name="RadScriptManager1_HiddenField" id="RadScriptManager1_HiddenField" value="" />

 

<

 

input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />

 

<

 

input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />

 

<

 

input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2NzIzMjI4NzcPZBYCAgMPZBYCAgMPFCsAAhQrAAIUKwACDxYCHhdFbmFibGVBamF4U2tpblJlbmRlcmluZ2hkEBYBZhYBFCsAAmRkDxYBZhYBBXNUZWxlcmlrLldlYi5VSS5SYWRUcmVlTm9kZSwgVGVsZXJpay5XZWIuVUksIFZlcnNpb249MjAwOC4xLjUxNS4yMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0xMjFmYWU3ODE2NWJhM2Q0ZGRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBQxSYWRUcmVlVmlldzGv38IwaZeoevzvxnflD61GufbRZA==" />
</div>

One other odd thing about this...
When the error is thrown, and processing is stopped in the code...
In the line "<form name="form1" method="post"..." where the highlighting starts, if I hover my mouse over "method" then a tooltip appears, and reads "post", just as the code shows. The same thing happens if I hover over "action"...the tooltip matches the code on the page. But, if I hover over "name", instead of the tooltip reading "form1", the tooltip reads "elmnt$orgChart$GoView1" which is the clientID of the chart control. The same is true if I hover over "id".
This is probably a meaningless observation but, I thought I would point it out.

 

0
Erjan Gavalji
Telerik team
answered on 20 Oct 2008, 08:00 AM
Hi Roger,

Thanks for the details! Your observation about the chart control ID is not meaningless at all - actually this gives some clues on where to search the problem.
The yellow highlighting is not relevant though - it is caused by some glitches in the Visual Studio debugging model.

There is a small thing I would suggest - create a new page (without any RadControls on it), add an UpdatePanel and an <asp:Button> to it, add the chart instance there too and try updating the chart control with the UpdatePanel.
If this scenario is supported, then the problem might be caused by some interaction between the third-party control and RadControls. In such a case, please, open a formal support ticket and share some more information about the chart and the scenario with us. Having that we will try reproducing the problem on our side and find a fix (or at least provide a workaround).
On the other hand, if the scenario is not supported, you could try RadChart (as far as its features suffice your needs), or you could contact the other vendor for some information.

Kind regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Roger
Top achievements
Rank 1
answered on 22 Oct 2008, 06:07 PM
Thank you for your attention to my issue, and for your responses.

I tested the situation, as you suggested. I removed the RadTreeView and just used a button to trigger the creation of the org chart. I received the same error as I had before so, I know that the error is not caused by RadTreeView or by its interaction with the other control.

I will focus on annoying the people who support the other control now!

The problem might be that I am "wrapping" that control in an ASP.NET user control that I have created. So, that might be the cause. I'll keep testing.

Thanks again for your help and your suggestions.
Roger.
Tags
TreeView
Asked by
Roger
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Roger
Top achievements
Rank 1
Share this question
or