开发者

NavigateUrl is not working with SelectedNodeStyle

开发者 https://www.devze.com 2023-01-05 03:10 出处:网络
I\'m trying to get SelectedNodeStyle to work with NavigateUrl without success. The style is not applied when clicking on nodes.

I'm trying to get SelectedNodeStyle to work with NavigateUrl without success. The style is not applied when clicking on nodes.

            <asp:TreeView ID="treeviewSIP" runat="server" ExpandDepth="0">
                <SelectedNodeStyle BackColor="Red" ForeColor="WhiteSmoke" 
                    BorderStyle="Solid" BorderWidth="1px" BorderColor="#66FF33">
                开发者_运维问答</SelectedNodeStyle>
            </asp:TreeView>

Node creation:

                With nyNode
                    .NavigateUrl = "thePage.aspx?op=visa&Tabell_ID=" + viewSIP.Item(sipIndex)("TABELL_ID").ToString
                    .Target = "main"
                    .Text = viewSIP.Item(sipIndex)("NAMN")
                    .SelectAction = TreeNodeSelectAction.Select
                    theParent.ChildNodes.Add(nyNode)
                End With

Any suggestions?


Did a workaround. Used TreeNode.Value instead of TreeNode.NavigateUrl and used the TreeView.SelectedItemChanged event to do the actual navigation.

0

精彩评论

暂无评论...
验证码 换一张
取 消