UltraWebTree - Losing Node information after post-back

rated by 0 users
This post has 5 Replies | 2 Followers

Not Ranked
Points 200
cyedor Posted: 12-21-2008 4:31 PM

I'm using an UltraWebTree and even though I turned the autopostback to false, I expand a branch on the tree and then another subbranch to reveal the children (reasons). After I select the reason, the web page does a post-back (as I said, I have all the post-backs turned to false....so that's confusing) and when I need to perform another action (such as a save of the information), I need the Node from the tree to determine all the parents and their cooresponding paths. 

This control was working fine with the 5.3 version but since upgrading (for a .Net upgrade) to the 8.3 version, the node is no longer available (null).

Any helpful information would be appreciated. 

 

 

Top 10 Contributor
Points 25,816
Infragistics Employee

Hello,

This definitely sounds weird. I did some tests on my own with the 8.3 version, but when AutoPostBack was set to false, the treeview did not postback in any of the cases I tried. Is there any way I can reproduce that locally? Can you please send your ASPX markup (and / or any relevant code behind) so we can reproduce the case?

I am just trying to figure out potential problems with the setup, e.g. AJAX, Load On Demand, Client-Side Events, etc - anything that could interfere with the treeview in any way.

Best Regards,

Rumen Stankov (MCSD.NET)

Infragistics Inc.

  • | Post Points: 20
Not Ranked
Points 200

Here's my html:

<ignav:UltraWebTree id="reasonCodesTreeView" runat="server" BorderStyle="Inset" BorderColor="#666666"

BackColor="Honeydew" BorderWidth="1px" Cursor="Default" WebTreeTarget="ClassicTree" Indentation="20"

Font-Size="9pt" Font-Names="Microsoft Sans Serif" ExpandImage="ig_treePlus.gif" CollapseImage="ig_treeMinus.gif"

EnableViewState="False" AutoPostBack=false Height="180px" Width="100%">

<SelectedNodeStyle Cursor="Default" BorderWidth="1px" BorderStyle="Solid" ForeColor="White" BackColor="#0099CC">

<Padding Bottom="1px" Left="2px" Top="1px" Right="2px"></Padding>

</SelectedNodeStyle>

<NodeEditStyle Font-Size="10pt" Font-Names="Microsoft Sans Serif"></NodeEditStyle>

<Levels>

<ignav:Level Index="0"></ignav:Level>

<ignav:Level Index="1"></ignav:Level>

<ignav:Level Index="2"></ignav:Level>

</Levels>

<Images>

<ExpandImage Url="ig_treePlus.gif" />

<CollapseImage Url="ig_treeMinus.gif" />

</Images>

<AutoPostBackFlags NodeChecked="False" NodeCollapsed="False" NodeDropped="False"

NodeExpanded="False" />

</ignav:UltraWebTree>

 

After I select the item on the tree (the lowest level of the tree), I need to click a button on the page to perform some other action. In the prior version of the control (5.3) and prior version of .Net (1.1), the node information is retained and am able to process the information. With this version, the node information gets lost. 

 

  • | Post Points: 20
Top 10 Contributor
Points 25,816
Infragistics Employee

Hello,

The only thing the I notice here that could be causing the state loss problem is EnableViewState - if you have this property set to False, you need to rebind the treeview each time on postback. Maybe this has changed between 5.3 and 8.3 - so please check if you rebind the treeview or set EnableViewState to True - this could solve / alleviate the problem.

Best Regards,

Rumen Stankov (MCSD.NET)

Infragistics Inc.

  • | Post Points: 20
Not Ranked
Points 200

Here's the solution to the issue.

On the page itself, I had to set EnableViewState to true.

Then on the tree control I had to set EnableViewState to true.

And it was in a WebGroupBox, so I had to set EnableViewState to true.

Different than 5.3 but it's working now.

 

  • | Post Points: 20
Top 10 Contributor
Points 25,816
Infragistics Employee

Hello,

Thanks for sharing the solution in public forums - I am sure it will be appreciated by other developers. Even though it is different from version 2005.3, I am sure that this is the desired behaviour, since disabling the ViewState for the parent containers will disable the view state of child controls as well (and thus, the SelectedNode property as well).

Thanks again for sharing that in forums.

Best Regards,

Rumen Stankov (MCSD.NET)

Infragistics Inc.

  • | Post Points: 5
Page 1 of 1 (6 items) | RSS

Forum Statistics

19,640 users have contributed to 78,505 threads and 87,114 posts.

In the past week, we've had 1,434 new users, adding to our total of 423,240 registered users!

In the past 24 hours, we have 22 new thread(s), 65 new post(s), and

In the past 3 days, the most popular thread for everyone has been "UltraGrid - ConditionAppearanceRow". The post with the most views is "Re: A gripe about support and sample projects". The most replies were made to "A gripe about support and sample projects".

Please welcome our newest member paig.