its alitle hard to explane what i wont.. but i will try any way. lets say i got 2 classes: public class person { private string firstname; private string lastname; private ArrayList exames; // (or HashTable) contaning Exame objects public string FirstName { get{return firstname;} set{firstname = value;} } public string LastName { get{return lastname;} set{lastname = value;} } public ArrayList Exames { get(return exames;} set{exames = value;} } } public Class Exame { private string examename; private int grade; public string ExameName { get{return examename;} set(examename = value;} } public int Grade { get{return grade;} set{grade = value;} } } so far so good.. but now i want to bind the person object to a datagrid. and i want the datagrid to show the next information: person mike = new person(); mike.FirstName = "mike"; mike.LastName = "james; mike.Exames.Add(new Exame()); ((Exame)mike.Exames[0]).ExameName = "english"; ((Exame)mike.Exames[0]).Grade = 100; mike.Exames.Add(new Exame()); ((Exame)mike.Exames[1]).ExameName = "math"; ((Exame)mike.Exames[1]).Grade = 90; in the next way in the grid: FirstName LastName english math (thouse are the column names) "mike" "james" 100 90 (the data itself) (P.S ignore the problem when a persion doesnt have a serten exame.. and all other small error's i know how to overcome them. i just need to know how to show it like this)
nonick2
Posts
-
datagrid complex object binding -
remoting and databindingthats bad :( i realy dont want to rewrite the whole functionality of databinding. i will try to ask microsoft using my frind's msdn subscription. maybe it works in VS2005? if so i will probebly move to it. i even tryed to creat a PROPERTYWARPER just like an event warper needed to rase events with remoting.. in this case i could do the subscribing to databinding. but the data was not updating :(
-
remoting and databindinghello. i am trying to creat a server/clients application and i want the server to hold an object and the clients to recive references to that object. (so far easy) but i also want to do databinding on some of the propertyes so when someone changes a property the other clients will see the change live... i tryed treating the remote object as an ordnary object and creat databinding but it didnt work.. is it even posible? can any one here give me an example of how to do it?
-
databinding over remotinghello. i am trying to creat a server/clients application and i want the server to hold an object and the clients to recive references to that object. (so far easy) but i also want to do databinding on some of the propertyes so when someone changes a property the other clients will see the change live... i tryed treating the remote object as an ordnary object and creat databinding but it didnt work.. is it even posible? can any one here give me an example of how to do it?