У меня странная проблема в сетке.
Вот страница aspx с выпадающим списком в заголовке.
asp:TabContainer ID="TabContainerType" runat="server"
ActiveTabIndex="0"
Height="626px" Width="1259px" >
<asp:TabPanel ID="tpDisperseSchemes" runat="server" HeaderText="Types">
<ContentTemplate>
<asp:UpdatePanel ID = "uplDisperseTypes" runat="server" >
<table>
<asp:GridView ID="gvType" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Id,UserId"
Height="152px" ondatabound="gvType_DataBound"
OnRowDataBound= "gvType_OnRowDataBound" ShowHeaderWhenEmpty="true"
OnPageIndexChanging="gvType_PageIndexChanging" EmptyDataText = " No Record Found"
PageSize="4"
<asp:TemplateField SortExpression="Type">
<HeaderTemplate>
<asp:DropDownList ID="ddlTypes" runat="server"
OnSelectedIndexChanged = "ddlTypes_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Value="0"> Please Select Type</asp:ListItem>
<asp:ListItem Value="1">Type1</asp:ListItem>
<asp:ListItem Value="2">Type2</asp:ListItem>
<asp:ListItem Value="3">Type3</asp:ListItem>
<asp:ListItem Value="4">Type4</asp:ListItem>
<asp:ListItem Value="5">Type5</asp:ListItem>
<asp:ListItem Value="6">Type5</asp:ListItem>
<asp:ListItem Value="7">Type7</asp:ListItem>
</asp:DropDownList>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind(TypeId")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</table>
Теперь, когда я выбираю схему из DropDown, она обновляет и выбирает данные в сетке - работает нормально.
Но сразу после отображения данных в сетке раскрывающийся список возвращается к первому значению «Пожалуйста, выберите тип» вместо того, чтобы оставаться при его выборе.
Спасибо за помощь Sun