?
Solved

DropDownList embedded in Gridview to update row

Posted on 2010-01-11
2
Medium Priority
?
265 Views
Last Modified: 2012-05-08
I have an ASP.Net page (code behind is C#). The page displays a gridview of players from a table called players in an Access database. I want to display a dropdownlist within each record for each player. The dropdownlist displays all of the positions a player is eligible for. This data is in a different table called playerpositions. The tables are linked by a field called ID. So the drop down list needs to show only the positions available for that player, using ID to filter them. Once a user selects a position from the list, I want to update the players table to reflect that position. The players table has a field called posno that holds the id of the position. I hope this makes sense. So far I have the gridview showing the players with a dropdownlist that displays every record from the playerpositions table, not filterd for the current player. Thanks for any help.
0
Comment
Question by:dodgerfan
[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 15

Accepted Solution

by:
jorge_toriz earned 1500 total points
ID: 26287889
Insert a SqlDataSource control that filters your positions dropDownList, then in the RowDataBound event of your gridView modify the value of the parameter of your SqlDataSource to take the UserId to filter the right positions.
0
 

Author Closing Comment

by:dodgerfan
ID: 31675755
no, i will not
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

770 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