This is my ASP code. I just took it from a sample:
<ignav:UltraWebTree ID="AccessTreeView" runat="server" Cursor="Default" ForeColor="Black"
Font-Size="8pt" Font-Names="Verdana" BorderColor="Pink" BorderStyle="Dashed" Height="400px"
Width="300px" Indentation="20" WebTreeTarget="ClassicTree" LoadOnDemand="Manual"
CompactRendering="False" EnableViewState="False" SingleBranchExpand="True" OnDemandLoad="AccessTreeView_DemandLoad">
<SelectedNodeStyle Cursor="Hand" CssClass="SelectClass"></SelectedNodeStyle>
<HoverNodeStyle Cursor="Hand" CssClass="Hover"></HoverNodeStyle>
<NodePaddings Left="5px"></NodePaddings>
<Padding Bottom="2px" Left="2px" Top="2px" Right="2px"></Padding>
<Levels>
<ignav:Level Index="0"></ignav:Level>
<ignav:Level Index="1"></ignav:Level>
</Levels>
<NodeMargins Top="2px"></NodeMargins>
<Styles>
<ignav:Style Cursor="Hand" ForeColor="Black" BackColor="OldLace" CssClass="HiliteClass">
</ignav:Style>
<ignav:Style BorderWidth="1px" BorderColor="DarkGray" BorderStyle="Solid" BackColor="Gainsboro"
CssClass="Hover">
<ignav:Style ForeColor="White" BackColor="#333333" CssClass="SelectClass">
</Styles>
</ignav:UltraWebTree>
This is my Page_Load code:
var AccessControlPopup = (PopupControl)RecordFormView.FindControl("AccessControlPopup");
AccessTreeView.Visible = true;
{
accessGroupNode.DataKey = accessGroup.AccessGroupKey.ToString();
}
AccessTreeView.DataBind();
AccessTreeView.ExpandAll();
When I step through the code, I clearly see that 1 node is being added to the collection AccessTreeView.Nodes. However, when the tree view is displayed, it is completely empty.
This is my DemandLoad code, however it is not being hit so I think it is irrelevent:
childAccessGroupNode.DataKey = childAccessGroup.AccessGroupKey.ToString();
Here's a very simple app which has the same problem:
CompactRendering="False" EnableViewState="False" SingleBranchExpand="True" OnDemandLoad="AccessTreeView_DemandLoad" >
<ignav:Level Index="2"></ignav:Level>
<ignav:Level Index="3"></ignav:Level>
<ignav:Level Index="4"></ignav:Level>
<ignav:Level Index="5"></ignav:Level>
public partial class _Default : System.Web.UI.Page
accessGroupNode.DataKey = "1";
accessGroupNode.Checked = true;
For now I am just using the tree view on a normal page but I will have to move it to a popup later.
I've got another problem now. When the page is loaded for the first time, the first node displays correctly. I expand the node and it correctly loads two chidren. However, when I expand one of those nodes, it clears out the tree altogeher. Here is all my code:
var rootAccessGroups = GetChildAccessGroups(0);
AccessTreeView.Nodes.Add( NewNode(accessGroup.Name, accessGroup.AccessGroupKey));
accessGroupNode.Text = name;
accessGroupNode.DataKey = key;
e.Node.Nodes.Add(NewNode(childAccessGroup.Name, childAccessGroup.AccessGroupKey));
I made test app with the same code and it works fine. The problem seems to be something specific to the popup control. I'll investigate further. The popup control is a standard AjaxControlToolkit modal popup extender.
From what I see, I really do not see where the poblem originates. Maybe it is something in project or page setup, or the PopupContainer that I see you are using inteferes in some way.
I believe in these cases, where problems are tough to find, the best approach is to assemble a small subset of your project reproducing the problem and send it to our dedicated Developer Support department via this link:
http://devcenter.infragistics.com/Protected/SubmitSupportIssue.aspx
Some info on environment (browser, VS.NET / .NET version, etc) will also help them repro the problem and advice further.
HTH,
Could this be something to do with images or something? I'm only using text at the moment. The version of the UltraWebNavigator is 7.3.20073.38 could that have something to do with it?