Dropdown has lost css and refresh panel trigger cannot find item id inside gridview
The css dropdown style changes on page load. I tried several ways to solve the problem. also i cant find id dropdownlist in Update Trigger ... any suggestions to help me ... i am stuck on this .. thanks in advance ...
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView runat="server" ID="gvDetails" AutoGenerateColumns="False" ShowHeaderWhenEmpty="True"
ForeColor="#333333" GridLines="None" ShowFooter="True" Width="855px">
<Columns>
<asp:BoundField DataField="SNo" HeaderText="S.N." ReadOnly="true" />
<asp:TemplateField Items Detail"
ControlStyle-Width="150px" ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<asp:DropDownList ID="ddlItem" runat="server" ForeColor="Black" Height="35px" CssClass="chzn-select"
Style="width: 210px;" Font-Bold="false" AutoPostBack="true" OnSelectedIndexChanged="ddlItem_SelectedIndexChanged">
</asp:DropDownList>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="lblTotalText" runat="server" Text="Total :"></asp:Label>
</FooterTemplate>
<ControlStyle Width="150px" />
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="" ControlStyle-Width="0px" Visible="true">
<ItemTemplate>
<asp:TextBox ID="txtMRP" runat="server" Enabled="false" Visible="true" BorderStyle="None"
BackColor="White" />
</ItemTemplate>
<ControlStyle Width="0px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="" ControlStyle-Width="0px" Visible="true">
<ItemTemplate>
<asp:TextBox ID="txtAmount" runat="server" Enabled="false" Visible="true" BorderStyle="None"
BackColor="White" />
</ItemTemplate>
<ControlStyle Width="0px" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlItem" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<br />
<div style="margin-left: 50px; margin-top: 10px">
</div>
<br />
<asp:Button ID="btnAddSalesOrder" runat="server" Text="Send Inquiry" OnClick="btnAddSalesOrder_Click"
Style="margin-left: 30px; color: White; background-color: #088FCA;" OnClientClick="myClosure();"
class="btn btn-info" />
<asp:Button ID="btnPlaceOrder" runat="server" OnClick="btnPlaceOrder_Click" Text="Place Order"
Style="margin-left: 30px; color: White; background-color: #088FCA;" OnClientClick="myClosure();"
class="btn btn-info" />
<asp:UpdateProgress ID="UpdtProgress" DisplayAfter="1" runat="server" EnableViewState="False">
<ProgressTemplate>
<div style="top: 0px; height: 120%; background-color: White; opacity: 0.75; filter: alpha(opacity=75);
vertical-align: middle; left: 0px; z-index: 999999; width: 120%; position: absolute;
text-align: center;">
<img src="Images/loader.gif">
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</div>
<script type="text/javascript">
$('.chzn-select').select2({
no_results_text: 'Oops, nothing found!',
allowClear: true,
maximumSelectionSize: 1,
width: '130px;'
});
+3
source to share
No one has answered this question yet
Check out similar questions: