single column binding from XML problem

7 posts, 1 answers
  1. Forumai
    Forumai avatar
    6 posts
    Member since:
    Mar 2009

    Posted 16 Mar 2009 Link to this post

    Problem with single column binding. I am using RadtreeView binding it with XML (generated from web service on the fly) Like this:
    ...
    webServices.WebService ws = new webServices.WebService();
    this.trvNames.ItemsSource = ws.getNames();
    ...

    my result row contains with 3 columns (NameId, Name, NameValue) and in tree view I see one value merged with 3 different values, I need that tree view will show me only Name. How to set to RadTreeView control to bind only from column / element Name value from code behind?.

    Thanks in advance for a help.

    F.
  2. Forumai
    Forumai avatar
    6 posts
    Member since:
    Mar 2009

    Posted 17 Mar 2009 Link to this post

    is this forum alive?
  3. Forumai
    Forumai avatar
    6 posts
    Member since:
    Mar 2009

    Posted 17 Mar 2009 Link to this post

    is it possible to customize data binding from code behind in this telerik:radTreeView control. If yes please guide us how to do it. We are planning to replace our controls to teleric controls if they are fully customizable.

    Thanks in advance.

    F.
  4. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 19 Mar 2009 Link to this post

    Hi Forumai,

    In order to achieve your scenario, you should use HierarchicalDataTemplate and DataTemplate. I am attaching a sample project which demonstrates how to do this. I hope this will help you resolve your issue.

    Please let me know if you have further questions.

    Sincerely yours,
    Tihomir Petkov
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Forumai
    Forumai avatar
    6 posts
    Member since:
    Mar 2009

    Posted 19 Mar 2009 Link to this post

    Thanks for replay, but it is not solution in code behind. We need to have fully customizable controls from code behind (c#).

    F.
  6. Answer
    Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 19 Mar 2009 Link to this post

    Hi Forumai,

    I updated the sample project to create the hierarchical templates in the code-behind. Please review it and let me know if it solves your problem.

    Kind regards,
    Tihomir Petkov
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Forumai
    Forumai avatar
    6 posts
    Member since:
    Mar 2009

    Posted 19 Mar 2009 Link to this post

    Thanks a lot. This solution in code behind fits to our needs.

    F.
Back to Top