// Uncomment, and SmartGrid will start displaying the Manager field // (when commented, User class will inherit Object.ToString() and SmartGrid will therefore reject it) // public override string ToString() { return '['+Name.ToUpper()+']'; } public static User[] FindAll() { User[] users = new User[3]; users[0] = new User("ayende", "*****@*****.**"); users[1] = new User("foo", "*****@*****.**"); users[2] = new User("bar", "*****@*****.**"); users[2].Manager = users[1]; users[1].Underlings = new List<User> (new User[] { users[0], users[2] }); return users; }
public void OverrideEmpty() { PropertyBag["users"] = new User[0]; }
public void Empty() { PropertyBag["users"] = new User[0]; }