S
sam44
Hi,
I have a dropdown in my gridview :
<asp:TemplateField HeaderText="Analyst">
<EditItemTemplate>
<aspropDownList ID="ddAnalyst" runat="server"
DataTextField="FullName"
datavaluefield="UserID" DataSource='<%# GetAllAnalysts() %>'>
</aspropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblAnalyst" runat="server" Text='<%#
Bind("FullName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
It works fine, except that when I enter edit mode, the first item in
the dropdown is selected. I would like that the selected item is the
one matching the value for that row. What is the easiest way to do this
?
Thank you
I have a dropdown in my gridview :
<asp:TemplateField HeaderText="Analyst">
<EditItemTemplate>
<aspropDownList ID="ddAnalyst" runat="server"
DataTextField="FullName"
datavaluefield="UserID" DataSource='<%# GetAllAnalysts() %>'>
</aspropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblAnalyst" runat="server" Text='<%#
Bind("FullName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
It works fine, except that when I enter edit mode, the first item in
the dropdown is selected. I would like that the selected item is the
one matching the value for that row. What is the easiest way to do this
?
Thank you