D
Darren
hi
i have got a dropdownlist in a templatecolumn and I am
trying to load it with values.
this is the code in the testGrid_EditCommand function
testGrid.EditItemIndex = e.Item.ItemIndex;
DropDownList list =
(DropDownList).Item.FindControl("employees");
// The dropdownlist is not found
list.DataSource = employeeList.DataSource;
//employeeList is another dropdownlist on the page
also i have tried by specifying the datasource in the html
<EditItemTemplate>
<asp
ropDownList ID="employees" Runat=server
OnSelectedIndexChanged="employees_SelectedIndexChanged"
DataSource='<%# employeeList.DataSource%>'
DataTextField="Name" DataValueField="Name">
I have also tried using methods in the datasource which
return data from the database,
nothing works...only an empty list is displayed
I would appreciate any help
thanks
i have got a dropdownlist in a templatecolumn and I am
trying to load it with values.
this is the code in the testGrid_EditCommand function
testGrid.EditItemIndex = e.Item.ItemIndex;
DropDownList list =
(DropDownList).Item.FindControl("employees");
// The dropdownlist is not found
list.DataSource = employeeList.DataSource;
//employeeList is another dropdownlist on the page
also i have tried by specifying the datasource in the html
<EditItemTemplate>
<asp

OnSelectedIndexChanged="employees_SelectedIndexChanged"
DataSource='<%# employeeList.DataSource%>'
DataTextField="Name" DataValueField="Name">
I have also tried using methods in the datasource which
return data from the database,
nothing works...only an empty list is displayed
I would appreciate any help
thanks