I have a gridview that is connected to an sqldatasource, my select statement joins two tables, Survey & Category. a column in Survey is Cateogry_ID which refers to the primary key of the category table “ID”. The join i created is to show the category name instead of the ID.
SELECT
S.[ID],
S.[Survey_Name],
S.[Start_Date],
S.[End_Date],
C.[Category_Name],
S.[Username],
S.[Picture],
S.[Audience]
FROM [Survey] S
Inner Join
Category C On S.Category_ID = C.ID
when the admin wants to update the survey table and wants to update the category, I only want him to pick from the names in the category_name column from category table.. How can I bind a dropdownlist in the edit template of that column and achieve this in design time?
There’s a working example of binding table column in sql to gridview here. how-to-bind-a-dropdownlist-with-a-edititemtemplate-in-the-gridview use your column name there to achieve the same.
There’s a