DropDownList embedded in Gridview to update row
Posted on 2010-01-11
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.