Hi,
I am struggling with trying to set up a web form using a GridView to display and edit the many side of the relationship between Clients and Phones. That is, I am editing a Client record and want to display the many phones that the client can have in a grid. My table structure is like this:
Client:
ClientPK (primary key)
Name, etc
Phones:
PhonePK (primary key)
PhoneTypeFK (foreign key to phone type lookup)
PhoneNumber
ClientFK (foreign key to Client)
PhoneTypes:
PhoneTypePK (primary key)
PhoneType (description like "Home", "Mobile", "Work", etc)
I have my Client Business Object (oClient) set up and working, along with my Phone Business Object (oPhone) and my PhoneType BO (oPhoneType).
On my grdPhones I have set up columns for the Edit button, the Delete button, the PhoneTypeFK (which I want to be a dropdownlist showing the Phone Type) and the phone number. I also have an Add Phone button elsewhere on the form. It currently displays OK (except that it displays the PhoneTypeFK rather than the Phone Type description).
Can somebody please walk me through the setup to get this GridView to work properly?