1.53 Collections

1.53 Collections

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


esteban404 posted on Wednesday, June 14, 2006

I've not had trouble with collections of child objects before, but this is the first time I'm creating one with a Guid as a key member field. Doesn't seem like it should matter though. Here's the basic:
Customer : BusinessBase (int customerID)
Contact : BusinessBase (Guid contactID)
CustomerContact : BusinessBase (long recordID) each record contains a customerID and contactID and the collection correctly does not allow dups
CustomerContacts : BusinssCollectionBase

Does this need to be an integer on the child? Seems like it should work with a Guid, but maybe int is more functional?

I'm using a DevExpress LookupEdit control in the cell to allow the users to select the contact from a pop up control that limits the contacts to the selected customer. This all works well elsewhere, so I believe it's just the Guid issue I mentioned. Should I rewrite the Customer class to use an integer-base id to simplify?

_E

esteban404 replied on Thursday, June 15, 2006

Well, I got it to work by adding a button to bring up a selection form and parsing the selected value into the collection. My users don't like it so I'm modifying the collection to use an int instead of the Guid so they can just select from the already exposed control instead of invoking a dialog.

I was able to intercept the value, but it was a big pain so I just switched it out.

_E

Copyright (c) Marimer LLC