Answer the question
In order to leave comments, you need to log in
DropDownList event not triggered inside GridView?
Good afternoon.
Why can a DropDownList inside a GridView not fire the OnSelectedIndexChanged event?
<asp:UpdatePanel ID="updPnlTbl" runat="server" >
<ContentTemplate>
<asp:GridView ID="gvTaskList" runat="server" AllowPaging="false"
ShowHeaderWhenEmpty="True" PageSize="5" AutoGenerateColumns="false" Width="100%"
CssClass=" Grid" SelectedRowStyle-CssClass="sel" AlternatingRowStyle-CssClass="alt"
PagerStyle-CssClass="pgr" PagerSettings-Mode="NumericFirstLast" DataKeyNames="TaskID"
OnRowDataBound="gvTaskList_RowDataBound" OnSorting="gvTaskList_Sorting"
AllowSorting="true" OnRowCreated="gvTaskList_RowCreated" >
<Columns>
<asp:TemplateField HeaderText="Статус" SortExpression="Status">
<HeaderTemplate>
<asp:LinkButton ID="lnkBtnStatusHeader" runat="server" CommandName="Sort" CommandArgument="Status">Статус</asp:LinkButton><br />
<asp:TextBox ID="tbStatus" runat="server" OnTextChanged="tbStatus_TextChanged" OnPreRender="tbStatus_PreRender" Width="90px" AutoPostBack="true"></asp:TextBox>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblStatus" runat="server" Text='<%#Eval("Status") %>' Visible="false" />
<asp:DropDownList ID="ddlStatus" runat="server" OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged"
OnTextChanged="ddlStatus_TextChanged" OnPreRender="ddlStatus_PreRender" AutoPostBack="true" > </asp:DropDownList>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Top" />
<HeaderStyle Width="1%" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
Answer the question
In order to leave comments, you need to log in
Fortune teller mode: on
I guess in condition
should name be replaced with elem? because name is just a name, and elem is a name_date pair.
Because name.split('___')[1] is
maybe better like this?:Number(name.split('___')[1].match( /\d+/ ))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question