Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

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


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -