Child Collections

Child Collections

Old forum URL: forums.lhotka.net/forums/t/3050.aspx


DeHaynes posted on Tuesday, June 19, 2007

   Although this is not a CSLA issue, it does go hand in hand with CSLA. 

   I am creating an employee object and it has collection objects for Address, Phone Number and Email Addresses (starting out simple)  My issue is how to display this data in the UI.  I figured many of you have come across this and wondered how you dealt with it.

   My particular dilemma is that I don't want to use a datagrid to display the various addresses for the employee.  I would like to layout the address fields like they look when you normally view and address on a letter.  I was thinking a combo box with a list of all the available address types would allow for the selection of which address is displayed and finally, for each address which has data associated with it, the text would be a different color.

   How have any of you solved simliar issues with master-detail relationships when you didn't want to use a datagrid?

Nicholas Trevatt replied on Wednesday, June 20, 2007

Hi, of course this is one of those personal preference things but here's what I have tried. 

1)  The combo method combined with a text box/rich text box as you suggested.  I wasn't too fond of this one because I wanted to see all my options at single glance without having to cycle through the items in the combo.

2) A list box with a preformated read only short descripton (e.g. Address.ShortDescription) property which displays the bare essentials and opens a details dialog on double click.

3) A data grid which I format to resemble a list box (no row header, no column header, white grid lines, white backcolor etc) simply because I hate the look of grids, particularly small grids.  I display a subset of fields (type description, line one, suburb) and again a double click opens the details dialog.  This is my current preferred option because  it's just easy to align the data inside the invisible columns and it's dead easy to code because the details dialog already exists for data entry.

If the specific 'letter' look which you mention is your main priority I think what you suggested with a rich text box is probably best.  Perhaps it's not the most convenient for users though?

Cheers,
Nicholas



Copyright (c) Marimer LLC