This is a migrated thread and some comments may be shown as answers.

Web application very slow

2 Answers 155 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zeone Informatica
Top achievements
Rank 2
Zeone Informatica asked on 23 Jan 2012, 06:00 PM
I have a web application how use telerik rad controls. Every pages how contains rad controls runs very slow. I don't understand Why. 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HistoricoEncomendas.aspx.cs" Inherits="Hnrypharma.UI.Encomendas.HistoricoEncomendas" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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></title>
    <link href="../Styles/Styles.css" rel="Stylesheet" type="text/css" />
    <script src="../Scripts/jquery-1.7.min.js" type="text/javascript"></script> 
    <script src="../Scripts/jquery-ui.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
    $(document).ready(function () {
        $(window).resize(function () {
            $('.EncomendasCentro').css({
                position: 'absolute',
                left: ($(window).width() - $('.EncomendasCentro').outerWidth()) / 2,
                top: ($(window).height() - $('.EncomendasCentro').outerHeight()) / 2
            });
        });


        // To initially run the function:
        $(window).resize();


    });
</script>
    <form id="form1" runat="server">
    <div class="EncomendasCentro">
    <div style="text-align:center; width:100%;">
        <asp:Label ID="Label1" runat="server" Text="Historico de movimentos de encomendas" CssClass="titulo"></asp:Label>
        </div>
        <table>
            <tr>
                
                <td>
                    <asp:Label ID="Label2" runat="server" Text="Pesquisar"></asp:Label>
                </td>
                <td>
                    <telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true" runat="server" Width="250px"
                            Height="200px" DataTextField="nome" DataValueField="ID"
                            EmptyMessage="Escreva o nome do Cliente..."
                            onitemdatabound="RadComboBox1_ItemDataBound1" >
                    </telerik:RadComboBox>
                    <telerik:RadComboBox ID="RadEditCod" AllowCustomText="true" runat="server" Width="80px"
                            Height="200px" DataTextField="Cod" DataValueField="ID"
                            EmptyMessage="Cod..." 
                            onitemdatabound="RadEditCod_ItemDataBound" DropDownWidth="400px" >
                    </telerik:RadComboBox>
                   <telerik:RadDateInput ID="RadDateInput1" runat="server" Width="200px" Culture="pt-PT">
                    </telerik:RadDateInput>
                </td>
                <td>
                <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
                        RepeatDirection="Horizontal" AutoPostBack="True">
                <asp:ListItem Text="Produto" Value="1" Enabled="true" Selected=True></asp:ListItem>
                <asp:ListItem Text="CLiente" Value="2" Enabled="true"></asp:ListItem>
                <asp:ListItem Text="Data" Value="3" Enabled="true"></asp:ListItem>


                
                </asp:RadioButtonList>
                </td>
                <td>
                   <telerik:RadButton ID="btProcurar" runat="server" Width="139px" Height="26px" 
                            Text="Procurar" ForeColor="White" HoveredCssClass="goButtonClassHov" 
                        onclick="btProcurar_Click">
                        <Image ImageUrl="~/Images/botao_azul.jpg" IsBackgroundImage="true" />
                        </telerik:RadButton>
                </td>


            </tr>
        </table>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <!-- content start -->
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadGrid ID="RadGrid1" runat="server" Width="95%" ShowStatusBar="true"
            AutoGenerateColumns="False" PageSize="7" AllowSorting="True" AllowMultiRowSelection="False"
            AllowPaging="True" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
            OnNeedDataSource="RadGrid1_NeedDataSource" OnPreRender="RadGrid1_PreRender">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView Width="100%" DataKeyNames="cabecid" AllowMultiColumnSorting="True">
                <DetailTables>
                    <telerik:GridTableView  Name="Linhas" Width="100%">
                        <Columns>


                            <telerik:GridBoundColumn SortExpression="Cod" HeaderText="Cod" HeaderButtonType="TextButton"
                                DataField="Cod" UniqueName="Cod">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="Cedime" HeaderText="Cedime" HeaderButtonType="TextButton"
                                DataField="Cedime" UniqueName="Cedime">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="descricao" HeaderText="descricao" HeaderButtonType="TextButton"
                                DataField="descricao" UniqueName="descricao">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="QT" HeaderText="QT" HeaderButtonType="TextButton"
                                DataField="QT" UniqueName="QT">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="Bonus" HeaderText="Bonus" HeaderButtonType="TextButton"
                                DataField="Bonus" UniqueName="Bonus">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="D.Fin" HeaderText="D.Fin" HeaderButtonType="TextButton"
                                DataField="D.Fin" UniqueName="D.Fin">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn SortExpression="Preco" HeaderText="Preço" HeaderButtonType="TextButton"
                                DataField="Preco" UniqueName="Preco">
                            </telerik:GridBoundColumn>


                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
                <Columns>
                    <telerik:GridBoundColumn SortExpression="cabecid" HeaderText="cabecid" HeaderButtonType="TextButton"
                        DataField="cabecid" Visible=false>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Codigo" HeaderText="Cod Enc" HeaderButtonType="TextButton"
                        DataField="Codigo">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Data" HeaderText="Data" HeaderButtonType="TextButton"
                        DataField="Data">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Cliente" HeaderText="Cliente" HeaderButtonType="TextButton"
                        DataField="Cliente">
                        </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Localidade" HeaderText="Localidade" HeaderButtonType="TextButton"
                        DataField="Localidade">
                        </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Expedidor" HeaderText="Expedidor" HeaderButtonType="TextButton"
                        DataField="Expedidor">
                        </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <table width="100%">
            <tr>
                <td align="right">
                 <telerik:RadButton ID="RadVoltar" runat="server" Width="139px" Height="26px" 
                            Text="Voltar"
                        ForeColor="White" HoveredCssClass="goButtonClassHov" 
                        onclick="RadVoltar_Click">
                        <Image ImageUrl="~/Images/botao_azul.jpg" IsBackgroundImage="true" />
                    </telerik:RadButton>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>


2 Answers, 1 is accepted

Sort by
0
Zeone Informatica
Top achievements
Rank 2
answered on 24 Jan 2012, 04:45 PM
?? anyone have a idea?
0
Veli
Telerik team
answered on 26 Jan 2012, 01:02 PM
Hello Miguel,

Here are a few general performance topics that might help you optimize your page performance:

RadGrid Client/Server Performance Optimizations
Ajaxifying RadGrid
Saving The Grid ViewState In Session
Optimizing ViewState Usage

If the issue persists, consider opening a regular support ticket where you can send us a stripped down test project we can debug locally. This will help us better identify your particular scenario and advise you further.

Veli
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
General Discussions
Asked by
Zeone Informatica
Top achievements
Rank 2
Answers by
Zeone Informatica
Top achievements
Rank 2
Veli
Telerik team
Share this question
or