Hi,
I'm new to Infragistics and I badly need help. I need to convert an existing .ascx page that used UltraWebTree to WebDataTree. I thought it's just an easy replacement of properties and methods, unfortunately some properties/methods are missing (or could be renamed) in WebDataTree. For start, I can't convert the following using WebDataTree. Please help :(
<RootNodeStyle ForeColor="Black">
<SelectedNodeStyle BackColor="Black" BorderColor="Yellow" />
SelectedNode
Node.Level
Tag
Appreciate your immediate response. Thanks
Hi cdptlc,
Thank you for posting in the community.
In WebDataTree, node styling can be achieved through CSS. You can set the CSS classes of NodeParents and Selected nodes through the tree's NodeSettings. For instance:
Please let me know if this helps.
Hi Petar,
Thanks for the reply. I'm not sure if it's the one I'm looking for.
Here's the actual code (UltraWebTree) in ascx:
<ignav:UltraWebTree ID="Tree1" runat="server" MergeStyles="False" Width="250px" Height="140px" Font-Size="8pt" Font-Names=" Arial, Helvetica,sans-serif" CssClass="pd_controlWOborder" BorderStyle="Inset" BackColor="White" BorderWidth="2px" ForeColor="Black"> <RootNodeStyle ForeColor="Black" /> <SelectedNodeStyle BackColor="Black" BorderColor="Yellow" /></ignav:UltraWebTree>
Then on converting to WebDataTree (Infragistics35.web.v11.2), i have this code (see below code). But I can't directly replace the RootNodeStyle and SelectedNodeStyle (as highlighted above).
<ig:WebDataTree ID="WebDataTree1" runat="server" Height="140px" Width="250px" Font-Size="8pt" Font-Names="Arial, Helvetica, sans-serif" CssClass="pd_controlWOborder" BorderStyle="Inset" BackColor="White" BorderWidth="2px" ForeColor="Black" EnableExpandOnClick="False" EnableSingleBranchExpand="False" DragDropSettings-EnableExpandOnDrop="False" DragDropSettings-EnableDropInsertion="False">
</ig:WebDataTree>
Another question :) Hope to get a response for this as well :)
We have an existing code (in page's code behind) wherein SelectedNode is used. When I convert to WebDataTree, error is encountered (SelectedNode is not a member of 'Infragistics.Web.UI.NavigationControls.WebDataTree'). The property Level is also not found. There is an available 'SelectedNodes' but it refers to an array. Please help....
If Not WebDataTree1.SelectedNode Is Nothing Then If WebDataTree1.SelectedNode.Level >= 2 Then BtnSearch.Enabled = True End If End If
Thanks Much! -TLC
A follow-up question, What's the equivalent of 'Tag' (available from Infragistics.WebUI.UltraWebNavigator.Node) in Infragistics.Web.UI.NavigationControls.DataTreeNode?
{Original Code}
Dim node As New Infragistics.WebUI.UltraWebNavigator.Nodenode.tag = nodeCurrent.Id
{new code I'm trying to work on}
Dim node As New Infragistics.Web.UI.NavigationControls.DataTreeNodenode.????????? = nodeCurrent.Id
Big Thanks! -TLC
i have an object from created from Infragistics.Web.UI.NavigationControls.DataTreeNode, then I need to assign a
I converted from
Thank you for your reply.
I am attaching a sample illustrating how parent and selected nodes may be styled in WebDataTree. Please note that in order to select a node, the SelectionType property of the control needs to be set, for instance through:
WebDataTree1.SelectionType = Infragistics.Web.UI.NavigationControls.NodeSelectionTypes.Single;
The selected nodes, can subsequently be accessed through the SelectedNodes collection, i.e :
Regarding the replacement of the Tag property from WebTree, I would suggest that you use the Value property in order to set your data bindings. A guide presenting how this can be achieved may be found at:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=WebDataTree_Binding_WebDataTree_to_WebHierarchicalDataSource.html
Please let me know if you have any questions.
Thanks Petar. The code worked :)