Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

DropDownList embedded in Gridview to update row

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
dodgerfan
Asked:
dodgerfan
1 Solution
 
jorge_torizResearch & Development ManagerCommented:
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
 
dodgerfanAuthor Commented:
no, i will not
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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