Welcome Guest Search | Active Topics | Sign In | Register

EO CallbackPanel very slow with asp:grid!!! Options
tommyleo
Posted: Monday, March 1, 2010 3:32:36 PM
Rank: Member
Groups: Member

Joined: 10/25/2009
Posts: 26
I hava an "asp:GridView" inside a eo:CallbackPanel.

When I dislay over 500 rows in a gridview, all component inside a CallbackPanel are very slow!!!
I have try to set the gridview in enableviewstate=false, but is the same.

I like the CallbackPanel for LoadingDialogID, Triggers and AutoDisableContents, but in this type of page it is impossible too slow.

Is there any trip or I'm in wrong ?

This is the page :

Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportCartePrepagate.aspx.cs" Inherits="BackOffice.CartePrepagate.ReportCartePrepagate" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Report Carte Prepagate</title>
     <link href="../site.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function Chiudi() {
            window.close();
        }
     </script>
</head>
<body>

<form id="form1" runat="server">
    <eo:CallbackPanel ID="CallbackPanel1" runat="server" Width="100%" LoadingDialogID="dialogLoading"
    Triggers="{ControlID:Conferma;Parameter:}" AutoDisableContents="True">
        <center>
            <table class="myTab" style="width:100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="myTabUL">
                    </td>
                    <td class="myTabMT">
                    </td>
                    <td class="myTabUR">
                    </td>
                </tr>
                <tr>
                    <td class="myTabML">
                    </td>
                    <td style="text-align: center;">
                        
                        <table class="tableHeader" cellspacing="0" cellpadding="0"  style="width:100%;">
                            <tr>
                                <td>                        
                                    <table style="width: 100%" cellspacing="0" cellpadding="4" border="0">
                                        <tr>
                                            <td class="logoHeader">
                                            </td>
                                            <td class="titoloHeader">
                                                Report Carte Prepagate
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>   
                       
                        <center>
                        <table cellpadding="3" cellspacing="3" style="width: 700px">
                            <tr>
                                <td style="width: 170px; text-align: right;" class="lblForm">                                   
                                    Numero Progressivo :
                                </td>
                                <td style="width: 250px; text-align: left;" class="lblForm">
                                    Da :
                                    <asp:TextBox ID="txtDa0" runat="server" CssClass="txtForm"
                                        Width="100px" Wrap="False"></asp:TextBox>                                        
                                </td>                                
                                <td style="text-align: left;" class="lblForm">
                                    A :
                                    <asp:TextBox ID="txtA0" runat="server" CssClass="txtForm"
                                        Width="100px" Wrap="False"></asp:TextBox>                                        
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">
                                    <asp:DropDownList ID="listTipoData" runat="server" CssClass="txtForm" 
                                        Width="158px">
                                        <asp:ListItem Value="1">DataGenerazione</asp:ListItem>
                                        <asp:ListItem Value="2">DataAttivazione</asp:ListItem>
                                        <asp:ListItem Value="3">DataScadenza</asp:ListItem>
                                        <asp:ListItem Value="4">DataVendita</asp:ListItem>
                                        <asp:ListItem Value="5">DataUltimoMovimento</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td style="text-align: left;" class="lblForm">
                                    Da :
                                    <asp:TextBox ID="txtDaData" runat="server" CssClass="txtForm" Width="100px" ></asp:TextBox>
                                    <asp:Label ID="Label43" runat="server" CssClass="lblForm"
                                        Text="(dd/mm/yyyy)"></asp:Label>                                                                        
                                </td>                                
                                <td style="text-align: left;" class="lblForm">
                                    A :
                                    <asp:TextBox ID="txtAData" runat="server" CssClass="txtForm" Width="100px"></asp:TextBox>
                                        <asp:Label ID="Label1" runat="server" CssClass="lblForm"
                                            Text="(dd/mm/yyyy)"></asp:Label>                                 
                                </td>
                            </tr>                                
                       </table>
                       
                       <table cellpadding="3" cellspacing="3" style="width: 700px;">
                            <tr>
                                <td style="width: 170px; text-align: right;" class="lblForm">
                                    <asp:DropDownList ID="listTipoUtente" runat="server" CssClass="txtForm" 
                                        Width="158px">
                                        <asp:ListItem Value="0">Utente</asp:ListItem>
                                        <asp:ListItem Value="1">Partner</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td style="text-align: left;">
                                    <asp:TextBox ID="txtUserID" runat="server" CssClass="txtForm"
                                        Width="220px" Wrap="False"></asp:TextBox>                                        
                                </td>                                
                            </tr>
                            <tr>
                                <td style="text-align: right;">
                                   <asp:Label ID="Label7" runat="server" Text="Taglio € :" CssClass="lblForm"> </asp:Label>
                                </td>
                                <td style="text-align: left;">
                                    <asp:DropDownList ID="listTaglio" runat="server" CssClass="txtForm" 
                                        Width="220px">
                                        <asp:ListItem Value="0">-Qualsiasi-</asp:ListItem>
                                        <asp:ListItem Value="1">10,00</asp:ListItem>
                                        <asp:ListItem Value="2">20,00</asp:ListItem>
                                        <asp:ListItem Value="3">50,00</asp:ListItem>
                                        <asp:ListItem Value="4">100,00</asp:ListItem>
                                   </asp:DropDownList>                          
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">
                                   <asp:Label ID="Label9" runat="server" Text="Stato carta :" CssClass="lblForm"> </asp:Label>
                                </td>
                                <td style="text-align: left;">
                                    <asp:DropDownList ID="listStatoCarte" runat="server"
                                        DataTextField="Descrizione" DataValueField="ID"                                        
                                        CssCLass="txtForm" Width="220px">
                                    </asp:DropDownList>                            
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: right;">
                                   <asp:Label ID="lblOridnamento" runat="server" Text="Ordinamento :" CssClass="lblForm"> </asp:Label>
                                </td>
                                <td style="text-align: left;">
                                    <asp:DropDownList ID="listOrdinamento" runat="server" CssClass="txtForm" 
                                        Width="220px">
                                        <asp:ListItem Value="0">NumeroProgressivo</asp:ListItem>
                                        <asp:ListItem Value="1">DataGenerazione</asp:ListItem>
                                        <asp:ListItem Value="2">DataAttivazione</asp:ListItem>
                                        <asp:ListItem Value="3">DataScadenza</asp:ListItem>
                                        <asp:ListItem Value="4">DataVendita</asp:ListItem>
                                        <asp:ListItem Value="5">DataUltimoMovimento</asp:ListItem>
                                   </asp:DropDownList>
                                </td>
                            </tr>

                            <tr>
                                <td align="center" colspan="2"> 
                                    <asp:Label ID="lblErrore" runat="server" CssClass="lblErrore"></asp:Label>
                                </td>                               
                            </tr>
                            
                            <tr>
                                <td align="center" colspan="2"> 
                                   <asp:Button ID="Conferma" runat="server" CssClass="butForm" 
                                   Text="Conferma" onclick="Conferma_Click"  />
                                    <input id="butAnnulla" type="button" value="Annulla" 
                                    onclick="javascript:Chiudi();" class="butForm" />
                                </td>                               
                            </tr>
                            
                            <tr>
                                <td align="center" colspan="2"> 
                                    <asp:Button ID="butExcel" runat="server" Text="Export to Excel" CssClass="butForm" 
                                    onclick="ExportExcel"  Visible="false"/>
                                </td>                               
                            </tr>
                            
                        </table>
                        </center>

                    </td>
                    <td class="myTabMR">
                    </td>
                </tr>
                <tr>
                    <td class="myTabDL">
                    </td>
                    <td class="myTabMD">
                    </td>
                    <td class="myTabDR">
                    </td>
                </tr>
            </table>
            <asp:GridView ID="myGridCarte" runat="server" AutoGenerateColumns="False" 
                BorderStyle="None" CellPadding="1" CellSpacing="4" CssClass="MyGridView" 
                OnRowCreated="myGrid_RowCreated" EnableViewState="False">
                <Columns>
                    <asp:BoundField DataField="NumeroProgressivo" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Numero">
                        <HeaderStyle HorizontalAlign="Left" />
                        <ItemStyle HorizontalAlign="Left" Width="100px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Stato" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Stato">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Taglio" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Importo">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Generazione" 
                        HeaderStyle-CssClass="MyGridViewHeader" HeaderText="Generazione">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Vendita" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Vendita">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Partner" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Partner">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="UltimoMovimento" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Ult. Mov.">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Attivazione" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Attivazione">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Attiva" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Attiva">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Utente" HeaderStyle-CssClass="MyGridViewHeader" 
                        HeaderText="Utente">
                        <HeaderStyle HorizontalAlign="Right" />
                        <ItemStyle HorizontalAlign="Right" Width="120px" />
                    </asp:BoundField>
                </Columns>
            </asp:GridView>
        </center>              
    </eo:CallbackPanel> 
    <eo:Dialog runat="server" id="dialogLoading" BackShadeColor="Azure" BackShadeOpacity="70">
        <ContentTemplate>
            <table border="0" style="width: 200px;">
                <tr>
                    <td align="center">
                        <img alt="" src="/Images/loading/loading_aqua.gif" />
                    </td>
                </tr>
                <tr>
                    <td align="center" style="color: #3333CC">
                        Attendere prego...
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </eo:Dialog>
</form>

</body>
</html>
eo_support
Posted: Monday, March 1, 2010 3:37:08 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

That is very normal. CallbackPanel needs to post back all view state back to the server. When the Grid has a lot of data it will slow down the process considerably. You will need to either decrease the size of the Grid (for example, implementing paging) or disable ViewState on the Grid (which may not be an option for your particular business scenario).

Thanks!
tommyleo
Posted: Monday, March 1, 2010 3:59:01 PM
Rank: Member
Groups: Member

Joined: 10/25/2009
Posts: 26
Thx for your very fast reply!!!

I have post the code, and my gridview is set EnableViewState="False", but for the callbackpanel is the same, the page is always very slow!!!

I can't do paging because my customers need to print the whole page!!!

Thx
eo_support
Posted: Monday, March 1, 2010 4:09:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Check the number of items in your DropDownList. That is another performance killer besides view state.

Thanks!
tommyleo
Posted: Monday, March 1, 2010 4:24:41 PM
Rank: Member
Groups: Member

Joined: 10/25/2009
Posts: 26
Hi,

the dropdown are very small, max five items.

I'm sure the problem is the gridview, when I try with 10 rows(for example) is all OK!!!

I think that you must check the EnableViewState of the asp:gridview, I'm sure is not checked!!!!

eo_support
Posted: Monday, March 1, 2010 4:32:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Five items per drop down multiple by 500 drop downs are still a lot. : ) You can try to temporarily remove the drop downs to identify whether it is the drop down or not. If it is the drop down, you don't have a much of choice but to either completely remove the drop down or reduce the number of rows. Another option is to redesign your page because 500 items with a CallbackPanel doesn't really make much sense. It will bring you more trouble than benefits just as you have noticed. This is not anything particular with our CallbackPanel. You will run into the same issue even if you use ASP.NET UpdatePanel.

Thanks
tommyleo
Posted: Monday, March 1, 2010 4:41:44 PM
Rank: Member
Groups: Member

Joined: 10/25/2009
Posts: 26
Hi,

uhmmm I think that my english is the problem!!!

The dropdown are not in the gridview!!! They are five and no more!!!

I use the girdview just to display the data....(I can't use the eo:grid, because the eo:grid don't permit the cellpadding)

Thx


eo_support
Posted: Monday, March 1, 2010 4:49:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Oh. Sorry my bad. :) Then I am not sure why it would be so slow. You can try it with ASP.NET UpdatePanel to see whether you have the same result. UpdatePanel works very much the same way as CallbackPanel. The main difference is ours work with ASP.NET 1.1 because our CallbackPanel was released much earlier. Because you use GridView, which is ASP.NET 2.0, so this should not be a problem for you.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.