• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

ASP.NET Data Object to Handle One to Many

I am working on an ASP.NET web page.  I am trying to determine what the best controls are to use to work with a one-to-many relationship.  I am set with the parent object that allows me to do the basics of editing the record.
I am struggling with the second object which contains the many part of the relationship.  I have tried the various data controls with mild success.  The child table has four fields: DealID, EmployeeID, Percentage, FixAmount.  
I am able to get the connection with the  parent object so it displays only the records that are associated with the deal in the parent.  I would like to be able to Edit and Delete an entry which I can do with certain controls.  I would like to be able to put a drop-down list associated with the employee ID which has been the main challenge.  I would like to be able to add a new entry which I should be able to add a button to add the record and refresh the list.

What would be the best data control to be able to Edit and Delete the record and have the ability to put a drop-down list displaying when editing.

I am using VS2010 for this project.

1 Solution
StephanLead Software EngineerCommented:
I would go for a gridview and voor de dropdownlist use edititemtemplate along with ondatabound event. In there you can populate the datasource of the dropdownlist
Kamal KhaleefaInformation Security SpecialistCommented:
gridview is a good choice
ButlerTechnologyAuthor Commented:
Thank you for the feedback  -- I will investigate the gridview control a little more in-depth.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now