K
keithb
With a DropDownList in a GridView Edit Template, how can I set the
SelectedIndex property so that the list initializes to the value shown in
the Display template? When I set SelectedIndex to -1, the DropDownList
initializes to the first entry.
<aspropDownList ID="DropDownList2"
runat="server"
Width="75px"
DataSource='<%# ReleasesAccess.GetReleases() %>'
DataValueField = '<%# "RelID" %>'
DataTextField = '<%# "ShortName" %>'
SelectedIndex= '<%# -1 %>' >
</aspropDownList>
Thanks,
Keith
SelectedIndex property so that the list initializes to the value shown in
the Display template? When I set SelectedIndex to -1, the DropDownList
initializes to the first entry.
<aspropDownList ID="DropDownList2"
runat="server"
Width="75px"
DataSource='<%# ReleasesAccess.GetReleases() %>'
DataValueField = '<%# "RelID" %>'
DataTextField = '<%# "ShortName" %>'
SelectedIndex= '<%# -1 %>' >
</aspropDownList>
Thanks,
Keith