Hi, I have a GridView
in RowCommand
I call a div
floating% that loses the style when loading (has the search option)
This is my code I have everything in a UpdatePanel
, it visually loads it but after loading the data it is lost.
<div id="contenedor" style="display: none">
<div id="flotante">
<asp:UpdatePanel ID="upSuppliers" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel2" runat="server" ScrollBars="Auto" Width="100%">
<h3>REPUESTOS</h3>
<asp:Label ID="LblOrden" runat="server" Text="Orden"></asp:Label>
<asp:Label ID="LblComponente" runat="server" Text="Componente"></asp:Label>
<br />
<asp:TextBox ID="TxtOrden" runat="server" Enabled="false" Width="60px"></asp:TextBox>
<asp:TextBox ID="TxtComponente" runat="server" Enabled="false" Width="70px"></asp:TextBox>
<br />
<asp:Label ID="LblReferencia" runat="server" Text="Referencia"></asp:Label>
<br />
<asp:DropDownList ID="DdlReferencia" runat="server" CssClass="chzn-select" AutoPostBack="true" Height="16px" Width="218px"></asp:DropDownList>
<br />
<asp:Label ID="Descripcion" runat="server" Text="Descripcion"></asp:Label>
<br />
<asp:DropDownList ID="DdlDescripcion" runat="server" CssClass="chzn-select" AutoPostBack="true" Height="16px" Width="292px"></asp:DropDownList>
<br />
<asp:Label ID="LblInvenrtario" runat="server" Text="Inventario"></asp:Label>
<br />
<asp:TextBox ID="TxtInventario" runat="server" Enabled="false"></asp:TextBox>
<br />
<asp:Label ID="LblCantidad" runat="server" Text="Cantidad"></asp:Label>
<br />
<asp:TextBox ID="TxtCantidad" runat="server" TextMode="Number"></asp:TextBox>
<asp:Button ID="BtnAgregar" runat="server" Text="Agregar" CssClass="button" />
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" CssClass="button" />
<asp:GridView ID="GvProductos" runat="server" AutoGenerateColumns="false" PageSize="7" CssClass="gridview" DataKeyNames="Id,ProductoId" EmptyDataText="No existen registros para mostrar" AllowPaging="true">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Consecutivo" />
<asp:BoundField DataField="ProductoId" HeaderText="Id" />
<asp:BoundField DataField="Referencia" HeaderText="Referencia" />
<asp:BoundField DataField="Descripcion" HeaderText="Descripcion" />
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" />
<asp:TemplateField HeaderText="Eliminar" ShowHeader="False">
<ItemTemplate>
<asp:ImageButton ID="imgRU" runat="server" CausesValidation="False" CommandArgument="<%# CType(Container, GridViewRow).RowIndex %>"
CommandName="Eliminar" ImageUrl="..//Imagenes/Select_16.png" Text="Eliminar" ToolTip="Eliminar" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
<br />
<asp:Button ID="BtnCerrar" runat="server" Text="Cerrar" CssClass="button" OnClientClick="flotante(2)" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DdlReferencia" EventName="selectedindexchanged" />
<asp:AsyncPostBackTrigger ControlID="DdlDescripcion" EventName="selectedindexchanged" />
</Triggers>
</asp:UpdatePanel>
</div>
<div id="fondo">
</div>
Try without the div
floating% in a normal form only with the DropDownList
the UpdatePanel
, start fine but after the first SelectedIndexChanged
(does not show the postback
) you lose all the style of all DropDownList
.
I am working with Asp.net
Vb
JavaScript
. Thank you very much