Multiple fields as DisplayMember

3 posts, 0 answers
  1. Thomas Luck
    Thomas Luck avatar
    38 posts
    Member since:
    Jun 2006

    Posted 03 Nov 2008 Link to this post

    Hi everyone,

    Is there a way to show more than one field? As far as I can tell 'DisplayMember' only allows one field, but I'd like to display multiple.

    I made the same application with RadTree in WebForm and there I could easily change the text in the 'NodeBound' event. I didn't find this in WinForm.

    Thanks
    Thomas
  2. Thomas Luck
    Thomas Luck avatar
    38 posts
    Member since:
    Jun 2006

    Posted 03 Nov 2008 Link to this post

    Ik, I now fount the event 'DrawNode' - that I didn't find anywhere in the documentation - which seems to be equvalent to 'NodeBound' in ASP.NET.

    But now I have another problem: I want to use different FontStyles in one node. Is that even possible?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Nick
    Admin
    Nick avatar
    767 posts

    Posted 07 Nov 2008 Link to this post

    Hello Thomas Luck,

    Thank you for your questions.

    There is no way to add two display members. You can use string concatenation in some cases though.

    The DrawNode event is not like NodeBound event, but I am glad that it serves your needs. For instance, you can change the font of the first node in the root list using the following code snippet:

    this.radTreeView1.Nodes[0].Font = new Font("Verdana", 10); 

    In what situation/case do you want the node to have a different font?

    Do not hesitate to write me back if you have further questions.

    Sincerely yours,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top