Featured post
linq - Display properties of child object in Datagridview -
how can display in datagridview selected properties of object, , selected properties of member object of first object? think not require binding rely on hard coding updates, because updates initiate on non-ui threads, , think not easy bind. @ least i've had problems in other project.
basically i'm looking understand different ways can this. maybe linq, or whatever suitable. note: want display data in same table. child/parent 1:1 relation.
so example code:
public class user public property score integer public property details userdetails end class public class userdetails public property name string public property username string end class
hence, want table show columns: score, name, username
edit: oh, more easy thought, seems work:
dim q = (from n in userlist select new {n.score, n.details.name, n.details.username}).toarray
you can use databinding here, if use itypedlist interface expose properties wanted.
itypedlist powerful, hard understand, ime. best tutorial i've found tips binding grids hierarchical data using itypedlist interface
- Get link
- X
- Other Apps
Comments
Post a Comment