Declarative hierarchy building

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emilyjackson
    New Member
    • May 2016
    • 2

    Declarative hierarchy building

    Thanks for the answer to my first question because it helped. I also have another question to ask, hope it won't bother anyone. It was mentioned that Wpf GridControl can work with various data sources including hierarchical. How can that be done?
  • marrylugard
    New Member
    • May 2016
    • 2

    #2
    If you are using Dapfor Wpf Grid, Truly this code written in C# will perform for you as you required. But still try it on other platform.

    C#
    Code:
    //The author 
    class Author 
    { 
        public Author(string name) 
        { 
            Books = new List<Book>(); 
            Name = name; 
        } 
    
        public IList<Book> Books { get; private set; } 
        public string Name { get; private set; } 
    } 
    
    //The book 
    class Book 
    { 
        public Book(Author author, string name) 
        { 
            Author = author; 
            Title = name; 
        } 
    
        public Author Author { get; private set; } 
        public string Title { get; private set; } 
    }
    Last edited by Rabbit; May 4 '16, 04:02 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Comment

    Working...