Hi, I am using a Gridview to display some data. In EditItemTemplate of gridview I am using DropDownList for one of the column of gridview. DataSource of gridview is a table "UserEntries". And Datasource of Dropdown is another table "TypeEntries". Columns of TypeEntries are - Guid and TypeName. Guid is DataValueField of dropdown and TypeName is DataTextField. I am storing DataValueFiels of dropdown in UserEntries table.
Now when user clicks Edit button of gridview, how to populate dropdown with "TypeEntries" table? I am using
Dropdownlist tempddl = new Dropdownlist();
tempddl = (Dropdownlist)gvUserData.FindControl("ddlTypeListInGrid");
tempddl.DataSource = _section.GetTypeEntries();
tempddl.DataBind();
but it is not working. Can anyone tell me any other way to do this task? Thanks in advance.