Moik
May 19th, 2009, 10:54 AM
I have a Gridview in VS2008 that allows edit/update. I am using an EditItemTemplate to display a dropdown on edit instead of the usual label. This populates and works fine, but it does not remember the original value.
How do I set the initial selected value on the dropdownlist when it displays on edit? There does not seem to be a SelectedValue="" attribute in the dropdownlist and adding
<asp:ListItem><%# Bind("Description") %></asp:ListItem>
results in an error saying code blocks are not supported in this context.
Any clues would be welcomed
How do I set the initial selected value on the dropdownlist when it displays on edit? There does not seem to be a SelectedValue="" attribute in the dropdownlist and adding
<asp:ListItem><%# Bind("Description") %></asp:ListItem>
results in an error saying code blocks are not supported in this context.
Any clues would be welcomed