Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   Frameworks JS (http://www.forosdelweb.com/f127/)
-   -   gridview y ajax (http://www.forosdelweb.com/f127/gridview-ajax-518948/)

maralbust 13/09/2007 08:54

gridview y ajax
 
hola a todos, tengo el sgte codigo, donde uso, ajatoolkit y vb.net, el llenado de la grilla lo hago desde code behind.

Código:

<asp:UpdatePanel ID="updatePanel" runat="server">
        <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnConsultar" EventName="Click" />
        </Triggers>
        <ContentTemplate>
        <div id="div_dtgDetalle_Prof" runat="server" visible="false" style="overflow:scroll; width:600px; height:153px;">
                <asp:GridView ID="dtgDetalle_Prof" runat="server" BackColor="Transparent"
                BorderColor="Silver" BorderStyle="Ridge" BorderWidth="3px" CaptionAlign="Left"
                CellPadding="4" EmptyDataText=" " Font-Bold="True" Font-Names="Microsoft Sans Serif"
                Font-Size="X-Small" ForeColor="White" Height="22px" HorizontalAlign="Justify"
                RowHeaderColumn="1" Style="left: 0px; font-family: 'Microsoft Sans Serif'; position: static;
                top: 0px" UseAccessibleHeader="False" Width="894px">
                <FooterStyle BackColor="#99CCCC" BorderColor="White" ForeColor="DarkBlue" />
                        <Columns>
                                <asp:CommandField HeaderText="Staff" ShowSelectButton="True" />
                                <asp:CommandField HeaderText="Seleccion" ShowSelectButton="True" />
                                <asp:BoundField DataField="TIPO_PRESTADOR" ReadOnly="True" HeaderText="Tipo Prestador" >
                <ItemStyle CssClass="hiddencol" />
                <HeaderStyle CssClass="hiddencol" />
                </asp:BoundField>
                <asp:BoundField DataField="LA_CORRELATIVO" ReadOnly="True" HeaderText="Correlativo la" >
                <ItemStyle CssClass="hiddencol" />
                <HeaderStyle CssClass="hiddencol" />
                </asp:BoundField>
                <asp:BoundField DataField="CODIGO_INTERNO" ReadOnly="True" HeaderText="Codigo interno" >
                <ItemStyle CssClass="hiddencol" />
                <HeaderStyle CssClass="hiddencol" />
                </asp:BoundField>
                <asp:BoundField DataField="RUT" ReadOnly="True" HeaderText="Rut" />
                <asp:BoundField DataField="DIGRUT" ReadOnly="True" HeaderText="DV" />
                <asp:BoundField DataField="Nombre" ReadOnly="True" HeaderText="Razon Social" />
                <asp:BoundField DataField="LUGAR_ATENCION" ReadOnly="True" HeaderText="Lugar Atención" />
                <asp:BoundField DataField="COMUNA" ReadOnly="True" HeaderText="Comuna" />
                <asp:BoundField DataField="CIUDAD" ReadOnly="True" HeaderText="Ciudad" />
                <asp:BoundField DataField="REGION" ReadOnly="True" HeaderText="Region" />                                   
                </Columns>
                <RowStyle BackColor="White" BorderColor="White" BorderStyle="Outset" BorderWidth="2px"
                Font-Bold="False" Font-Names="Microsoft Sans Serif" Font-Size="XX-Small" ForeColor="#003399"
                Height="17px" HorizontalAlign="Center" VerticalAlign="Middle" />
                <EditRowStyle BorderColor="Black" BorderStyle="Outset" BorderWidth="2px" Font-Names="Microsoft Sans Serif"
                Font-Size="XX-Small" Height="17px" HorizontalAlign="Center" VerticalAlign="Middle" />
                <SelectedRowStyle BackColor="#009999" BorderColor="White" Font-Bold="True" ForeColor="#CCFF99" />
                <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                <HeaderStyle BackColor="SteelBlue" BorderColor="SkyBlue" BorderStyle="Inset" BorderWidth="0px"
                Font-Bold="True" Font-Names="Microsoft Sans Serif" Font-Size="XX-Small" ForeColor="Lavender"
                Height="28px" HorizontalAlign="Center" VerticalAlign="Middle" Width="300px" />
                </asp:GridView>
        </div>
        </ContentTemplate>
</asp:UpdatePanel>

<ajaxToolkit:UpdatePanelAnimationExtender ID="upae" BehaviorID="animation" runat="server" TargetControlID="updatePanel">
        <Animations>
                <OnUpdating>
                        <Parallel duration="0">
                                <%-- place the update progress div over the gridview control --%>
                                <ScriptAction Script="onUpdating();" /> 
                                <%-- disable the search button --%>                     
                                <EnableAction AnimationTarget="btnConsultar" Enabled="false" />
                                <%-- fade-out the GridView --%>
                                <FadeOut minimumOpacity=".5" />
                        </Parallel>
                </OnUpdating>
                <OnUpdated>
                        <Parallel duration="0">
                                <%-- fade back in the GridView --%>
                                <FadeIn minimumOpacity=".5" />
                                <%-- re-enable the search button --%> 
                                <EnableAction AnimationTarget="btnConsultar" Enabled="true" />
                                <%--find the update progress div and place it over the gridview control--%>
                                <ScriptAction Script="onUpdated();" />
                        </Parallel>
                </OnUpdated>
        </Animations>
</ajaxToolkit:UpdatePanelAnimationExtender>

igual es largo, la cosa es que cuando cargo por primera vez la grilla, lo hace perfecto, muestra el gif del loading, pero cuando hago un select desde la grilla o mejor dicho selecciono una fila, se que da pegado cuando deberia pasar a otra grilla, si pongo un breakpoint y traceo termina todos los procesos bien, como podria solucionar esto.

saludos a todos


La zona horaria es GMT -6. Ahora son las 13:06.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.