Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Binding to Complex Business Objects
posted

Say I have a set of Business Objects that look like this:

public class MasterObject

{

public string Description {get; set;}

private Settings _setting = new Settings();
public Settings MasterSettings
{
get { return _setting; }
}

private List<DetailObject> _details = new List<DetailObject>();

public List<DetailObject> Details

{

get { return _details; }
}


}

 

public class DetailObject

{

public string Description { get; set; }

public Option1 Option { get; set; }

pubilc Option2 Option {get; set; }
}

public class Settings

{

public string Setting1 {get; set;}

public string Setting2 {get; set; }

public string Setting3 {get; set; }


}

public class Option

{

public long id {get; set;}

public string Description {get; set;}
}


I want to bind to a list of Masterobjects, and I have these constraints:
1) Display and edit the MasterObject.Description.
2) Display and edit the MasterObject.MasterSetting property
 a) Editing is performed by selecting a MasterSetting from a list.
 b) The display text of the MasterSetting is determined by arbitrary means (i.e., ToString() will be an insufficient means to discover the display text.
3) Display and edit the list of DetailObjects that are contained by the MasterObject.
4) Display and edit the 2 Options on the DetailObjects using a list.
 a) like the MasterSetting, the display text is determined by arbitrary means; the ToString() function will be insufficient for discovering the display text.
 
My understanding of the UltraGrid is that I'll need two bands to get started--one each for the Master and Detail objects.
My first problem is that the cells containing the complex object properties show the class name (I need to set the display text to one of the properties, but which property is determined at runtime).
My second problem is that I don't see how to specify the list editing control, or the list of Settings and Options classes that the lists should pull from.

I have been unable to find a sample that is on point. All of the binding-to-business-objects samples I have seen so far rely on "flat" business objects.
Where do I go from here?
Thanks
Chris McKenzie

Parents Reply Children
No Data