Problem with GridView and DataPaging

Problem with GridView and DataPaging

Postby JORGEMAL » Tue 26 Oct 2010 15:13

I have a very simple form that contains an asp:GridView and a PgSqlDataSource which is part of a web site.

The asp:GridView is defined as follows:
Code: Select all
                ID="grdClasificacion"
                runat="server"
                AllowPaging="True"
                AutoGenerateColumns="False"
                CellPadding="4"
                CellSpacing="1"
                DataKeyNames="clave"
                DataSourceID="dsClasificacion"
                PageSize="11"
                CssClass="gridview_general"
                HorizontalAlign="Center"
                EmptyDataText="No existen clasificaciones para los platillos">
               
                                            ButtonType="Image"
                        HeaderText="Selecciona"
                        SelectImageUrl="~/Imagenes/Ok18.png"
                        SelectText="Selecciona una clasificación"
                        ShowSelectButton="True">
                                                    HorizontalAlign="Center"
                            Width="40px" />
                   

                                            DataField="clave"
                        HeaderText="Clave"
                        ReadOnly="True"
                        SortExpression="clave"
                        Visible="False" >
                                                    HorizontalAlign="Center"
                            Width="40px" />
                   

                                            DataField="nombre"
                        HeaderText="Nombre"
                        SortExpression="nombre" >
                                                    HorizontalAlign="Center"
                            Width="150px" />
                   

                                            DataField="descripcion"
                        HeaderText="Descripcion"
                        SortExpression="descripcion" >
                                                    HorizontalAlign="Center"
                            Width="350px" />
                   

                                            DataField="descto"
                        HeaderText="Descto."
                        SortExpression="descto"
                        DataFormatString="{0:F2}%"
                        HtmlEncode="False"
                        Visible="false" >
                                                    HorizontalAlign="Center"
                            Width="80px" />
                   

                                            DataField="estatus_descto"
                        HeaderText="Estatus Descto."
                        SortExpression="estatus_descto"
                        Text="Activo"
                        Visible="false" >
                                                    HorizontalAlign="Center"
                            Width="80px" />
                   

               

                                    FirstPageImageUrl="~/Imagenes/First24.png"
                    LastPageImageUrl="~/Imagenes/Last24.png"
                    Mode="NextPreviousFirstLast"
                    NextPageImageUrl="~/Imagenes/Next24.png"
                    PreviousPageImageUrl="~/Imagenes/Previous24.png" />
                                    CssClass="gridview_pager" />
                                    CssClass="gridview_selected" />
                                    CssClass="gridview_header" />
                                    CssClass="gridview_row" />               
           




The PgSqlDataSource is defined as follows:
Code: Select all
        ID="dsClasificacion"
        runat="server"
        OldValuesParameterFormatString="Original_{0}"
        ProviderName="Devart.Data.PostgreSql"
        SelectCommand="SELECT * FROM clasificacion ORDER BY nombre"
        SelectCommandType="Text"
        DataPagingMode="Auto" >



While I was developing and testing everything was working just fine but, now that I installed the web site in a production server, I have the following problem with this page:

1. If I access the page using Microsoft IE8 it takes too long to go from one page to another and sometimes I get the following error message:
----------------------------------------------------------------------------------
Detalles de error de página web
Agente de usuario: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Fecha: Tue, 26 Oct 2010 14:57:08 UTC

Mensaje: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.
Línea: 513
Carácter: 13
Código: 0
URI: http://www.teressoftware.com/ScriptReso ... ff93dd261c

Mensaje: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.
Línea: 513
Carácter: 13
Código: 0
URI: http://www.teressoftware.com/ScriptReso ... ff93dd261c
-----------------------------------------------------------------------------------

2. If I access the page using FireFox, Chrome and Opera it works correctly.

One important thing to note is that the table that is referenced in the PgSqlDataSource only has 15 records right now.

I have additional web pages with these characteristics but this is the first one to reach the maximum number of rows in the grid and display the paging options. I suppose that the others will behave the same at some point in time.

My question is, do you know about any issue with IE8 and PgSqlDataSource?

I am using Visual Studio 2008, .NET Framework 3.5, PostgreSQL 9, dotConnect for PostgreSQL 4.95.180.

Respectfully,
Jorge Maldonado
JORGEMAL
 
Posts: 164
Joined: Thu 03 Jul 2008 23:55

Postby StanislavK » Thu 28 Oct 2010 15:41

The error you are getting is a common ASP.NET exception specifying that an asynchronous postback was not processed during the specified time interval:
http://msdn.microsoft.com/en-us/library/bb310955.aspx

To determine whether this is related to the PgDataSource component, please check how much time it takes to execute the specified select command on the production server. For example, you can execute "SELECT * FROM clasificacion ORDER BY nombre" via the PgSqlCommand object with different CommandTimeout values.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby JORGEMAL » Thu 28 Oct 2010 22:27

But, do you have any idea about why it only happnes with IE8? I do not always get the error message, in fact, it only appears very few times. The main behavior is that it takes too long to navigate the grid from one page to another using IE8 (40 seconds and more) while the rest of the Internet browsers (FireFox, Opera, Chrome and Safari) perform fine.

Best regards,
Jorge Maldonado
JORGEMAL
 
Posts: 164
Joined: Thu 03 Jul 2008 23:55

Postby StanislavK » Fri 29 Oct 2010 17:08

This exception is raised by the standard Sys.WebForms.PageRequestManager class, and may be caused by the peculiarities of ASP.NET realization for Internet Explorer 8. We recommend you to address this issue to the Microsoft support.

However, you can check the execution time for the PgSqlDataSource commands, e.g., with the DbMonitor application. If this execution time is significantly less than the AsyncPostBackTimeout value of the ScriptManager component on your form, i.e., the command is executed before the timeout interval expires, this is unlikely that the problem is related to the PgSqlDataSource component.

Also, you can send us a test project so that we are able to analyze the situation in details.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for PostgreSQL