in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Makin a single node link to a page.

Last post 11/20/2008 7:55 AM by ioannis giannis. 3 replies.
Page 1 of 1 (4 items)
Sort Posts:
Previous Next
  • 11/17/2008 8:57 AM

    Makin a single node link to a page.

    Hello DevExpress,

    I have read some similar posts about "how to make nodes links to pages" but i cant find a certain answer.

    I am using an ASPxTreeList which binds data from a data table with the following fields: "ID", "ParentID", "FieldName" and "FieldLink" which is a path with a url.

    I only display the "FieldName" field.

    I am using HtmlRowPrepared class to get the value for the "FieldLink" field for each node , but i dont know how to make the "FieldName" text linkable.

    Thank you a lot.

     

  • 11/18/2008 2:47 AM In reply to

    Re: Makin a single node link to a page.

    I found this easy n usefull code at an older post:

    If so, you can use DataCell template and data binding expressions like shown below:
                   
    <dxwtl:ASPxTreeList ...>
        <Templates>
            <DataCell>
                <asp:HyperLink ID="link" runat="server" NavigateUrl='<%# "..." %>' ><%# Container.Text %></asp:HyperLink>
            </DataCell>
        </Templates>
    </dxwtl:ASPxTreeList>

    which runs terrific, but my problem still existis because i dont know how to insert the "FieldLink" field into the NavigateUrl='<%"..."%>'

     

  • 11/20/2008 5:05 AM In reply to

    Re: Makin a single node link to a page.

    Hi,

    This should work:

    NavigateUrl='<%# Eval("FieldLink") %>'

    Thanks, Alexey M
    R&D, .NET Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 11/20/2008 7:55 AM In reply to

    Re: Makin a single node link to a page.

    Thank you Alexey, your solution works fine ! I couldnt imagine it's soo simple Big Smile

    I have another simple question for ASPxTree too,

    i want to see only the root  items of my ASPxTree when the page loads for the first time, and not the whole tree.

    i want the user to be the one who decides where to navigate through the tree.

    Is tha possible ??

    Thanks again for your great support.

     

Page 1 of 1 (4 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED