473,387 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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?
May 4 '16 #1
1 1541
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#
Expand|Select|Wrap|Line Numbers
  1. //The author 
  2. class Author 
  3.     public Author(string name) 
  4.     { 
  5.         Books = new List<Book>(); 
  6.         Name = name; 
  7.     } 
  8.  
  9.     public IList<Book> Books { get; private set; } 
  10.     public string Name { get; private set; } 
  11.  
  12. //The book 
  13. class Book 
  14.     public Book(Author author, string name) 
  15.     { 
  16.         Author = author; 
  17.         Title = name; 
  18.     } 
  19.  
  20.     public Author Author { get; private set; } 
  21.     public string Title { get; private set; } 
  22. }
May 4 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Darryll Petrancuri | last post by:
Greetings! I could really use some suggestions on how to improve on the following, it at all possible: Table 'Customer' --------------------- ID GUID PK ....
2
by: Eric Newton | last post by:
VB's more declarative nature of handling events is golden. I'm hoping C# will acquire this type of deal, in addition to the anonymous delegates. could do same as vb (actually would be easier to...
1
by: Gustaf Liljegren | last post by:
My input data consists of a list of parent-child relationships. One item in this list can be modelled like this: +---------+ | Item | +---------+ | Parent | | Child | +---------+
0
by: Ed West | last post by:
Hello, I am wondering about best practices for class hierarchies and using ADO.Net, especially the DataSet update/delete commands and the data relations... this needs to package/unpackage to xml...
0
by: Irfan Akram | last post by:
Hello People, I would appreciate your responses on this. I am writing an asp.net web-application involving C#. I am actually building a test hierarchy at the moment, which involves producing...
1
by: dasein fiasco | last post by:
I'm sure this is a design question that is commonly encountered, but I can't find any resources which explain how to solve it. I would deeply appreciate any advice. Basically, when building a...
1
by: JeffDotNet | last post by:
I have been enjoying the declarative use of the new sqlDataSource in asp2.0. It makes paging and query building extremely quick and simple. However occasionally I expect to get a timeout...
3
by: Sean Chambers | last post by:
Hello, I feel that there is a cleaner way to accomplish what I am trying to do. I have 4 different types of classes: -Request --Step ---QuestionSet
1
by: Steven T. Hatton | last post by:
All of the following terms are used in some way to describe where and how a name is relevant to a particular location in a program: visible, declarative region, scope, potential scope, valid,...
3
by: krzysztof.konopko | last post by:
Hello! I want to design a class hierarchy with one base abstract class, let's say CBase. I have a predicate that every object in the class hierarchy must have a parent object of type from this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.