Solved

Use a datarelation to automatically populate and save info from datagrid dropdowns

Posted on 2004-04-20
2
257 Views
Last Modified: 2008-03-06
Environment: ASP.NET web application, VB.net server side code, SQL Server 2k database

I have a datagrid and, to simplify the problem, let's say that it contains two columns: ClientName and InsideSales

I have a dataset that contains two datatables - Clients and Sales.  Clients has a SalesID column and that is the primary key of the Sales table.  I know how to create the dataset, the datatables, and the appropriate datarelation for SalesID.

I would like the following functionality:

1) The datagrid should populate and display SalesName.
2) When a row is edited, the Sales drop-down should default to the correct SalesName of course.
3) If the user chooses a new SalesName from the drop down and saves the row, the logic should automatically save the appropriate salesID in the Clients table.

Can this be done with the datarelation?  I would like to do it this way if so.  Does the datarelation somehow bind that chosen drop down id to the Client table SalesID?
0
Comment
Question by:MrDeveloper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
nishikanth earned 500 total points
ID: 10874931
0
 

Author Comment

by:MrDeveloper
ID: 11151899
thank you nishikanth - I'm very sorry for the delay in awarding your points.  Thanks!
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question