Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 views

We are dealing with major performance issues on our website and I started to diagnise the issue.

For testing, I took simple web page with telerik grid that has one column and one row. After saving this page physically on my hard disk I noticed that there are 32 .axd files saved which are about 1.02mb in size. 17 of them are ScriptResource.axd and 15 of them are WebResource.axd.

We are trying to fine tune our application for 256kbps download speed, which means it will take about 4-5 seconds to launch telerik web page grid with one column and one row (4-5 sec download time to downloan 1mb over 256kbps speed). That’s what we are seeing in all pages, launch times are between 5-9 seconds. Can I do some tweak to telerik code to bring down launch time to 1 second by reducing total .axd file size to 256kb? OR is it that telerik controls are not suitable for 256kbps internet speed??

Question

1) Can I move any of these .axd files to client PC on first instance?

2) Can I reduce .axd file size?

3) Can I reduce number of .axd files downloaded to client PC?

PLEASE HELP.

Fiko
Telerik team
 answered on 13 May 2010
1 answer
123 views
My radGrid displays data from a SQL Server 2008 data source. Because the information is proprietary I have have had to blot out any real information but I have left what is needed to show you the issue I am seeing.

When the radGrid is populated everything works great. Data lines up properly in all columns, when you hover on the link a radTooltip popup out displaying information.

But when you sort on any column, the columns stop lining up because it looks like "word wrapping" gets turned off. So instead of one of our Agency names wrapping and displaying on two lines in the grid column it is shown on one line. This would be fine if I could get this to be consistent for all columns and column headers. The agency name is pushed into the next 2 columns data so that data is pushed over as well.

I have attached two screenshots showing what I am talking about. As you can see in the Before.png, everything looks and works fine including the tooltip. After sorting, the Agent Name column spans well into the 3rd column over, SCAC. Also, strangely after sorting my tooltip ceases working.

How do I get my columns to stay lined up and can anyone answer why the tooltip breaks when the data is sorted?

search.ascx
<telerik:RadAjaxManager ID="radAM" runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="radRadiusSearch"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="radRadiusSearch" LoadingPanelID="radALP" /> 
                <telerik:AjaxUpdatedControl ControlID="radTTM" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 
<telerik:RadAjaxLoadingPanel ID="radALP" runat="server"></telerik:RadAjaxLoadingPanel> 
<telerik:RadToolTipManager ID="radTTM" runat="server" OffsetY="-1" HideEvent="LeaveToolTip" 
 Width="300" Height="75" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element" Position="BottomRight" Skin="Windows7"
 </telerik:RadToolTipManager> 
 
<telerik:RadGrid ID="radRadiusSearch" runat="server"  
    AllowSorting="True" AllowPaging="True"   
    width="950px" AutoGenerateColumns="False"     
     Skin="Windows7"  
    EnableViewState="False" Visible="False"
    <MasterTableView Width="950px" AllowMultiColumnSorting="true" DataKeyNames="AgentNumber" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" Dir="LTR" Frame ="Border" TableLayout="Auto"
        <Columns> 
            <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="AgentNumber" Display="false" 
                DataType="System.String" FilterListOptions="VaryByDataType" ForceExtractValue="None" 
                HeaderText="Agent #" ReadOnly="True" SortExpression="AgentNumber" UniqueName="AgentNumber"
            </telerik:GridBoundColumn>                               
            <telerik:GridTemplateColumn HeaderText="Agent #" SortExpression="AgentNumber"
                <ItemTemplate> 
                    <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("AgentNumber") %>'></asp:HyperLink> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn>             
            <telerik:GridBoundColumn DataField="AgentName" DataType="System.String" HeaderText="Agent Name" SortExpression="AgentName" UniqueName="AgentName" /> 
            <telerik:GridBoundColumn DataField="WhseCity" DataType="System.String" HeaderText="City" SortExpression="WhseCity" UniqueName="WhseCity" /> 
            <telerik:GridBoundColumn DataField="WhseState" DataType="System.String" HeaderText="St" SortExpression="WhseState" UniqueName="WhseState" /> 
            <telerik:GridBoundColumn DataField="PrimeSCAC" DataType="System.String" HeaderText="SCAC" SortExpression="PrimeSCAC" UniqueName="PrimeSCAC" /> 
            <telerik:GridBoundColumn DataField="AgentClass" DataType="System.String" HeaderText="Class" SortExpression="AgentClass" UniqueName="AgentClass" /> 
            <telerik:GridBoundColumn DataField="Miles" DataType="System.String" HeaderText="Miles" SortExpression="Miles" UniqueName="Miles" /> 
            <telerik:GridBoundColumn DataField="DP3_OA_COUNT" DataType="System.String" HeaderText="OA" SortExpression="DP3_OA_COUNT" UniqueName="DP3_OA_COUNT" /> 
            <telerik:GridBoundColumn DataField="DP3_HLG_COUNT" DataType="System.String" HeaderText="HLG" SortExpression="DP3_HLG_COUNT" UniqueName="DP3_HLG_COUNT" /> 
            <telerik:GridBoundColumn DataField="DP3_DA_COUNT" DataType="System.String" HeaderText="DA" SortExpression="DP3_DA_COUNT" UniqueName="DP3_DA_COUNT" /> 
            <telerik:GridBoundColumn DataField="DP3_Q4_PERC" DataType="System.String" HeaderText="Q4%" SortExpression="DP3_Q4_PERC" UniqueName="DP3_Q4_PERC" /> 
            <telerik:GridBoundColumn DataField="DP3_Q5_PERC" DataType="System.String" HeaderText="Q5%" SortExpression="DP3_Q5_PERC" UniqueName="DP3_Q5_PERC" /> 
            <telerik:GridBoundColumn DataField="DP3_Q6_PERC" DataType="System.String" HeaderText="Q6%" SortExpression="DP3_Q6_PERC" UniqueName="DP3_Q6_PERC" /> 
            <telerik:GridBoundColumn DataField="DP3_Q7_PERC" DataType="System.String" HeaderText="Q7%" SortExpression="DP3_Q7_PERC" UniqueName="DP3_Q7_PERC" /> 
            <telerik:GridBoundColumn DataField="DP3_Q8_PERC" DataType="System.String" HeaderText="Q8%" SortExpression="DP3_Q8_PERC" UniqueName="DP3_Q8_PERC" /> 
            <telerik:GridBoundColumn DataField="ClaimsTotalShipments" DataType="System.String" HeaderText="12 Mth Cnt" SortExpression="ClaimsTotalShipments" UniqueName="ClaimsTotalShipments" /> 
            <telerik:GridBoundColumn DataField="QltyRatingDisplay" DataType="System.String" HeaderText="Qlty Rating" SortExpression="QltyRatingDisplay" UniqueName="QltyRatingDisplay" /> 
        </Columns> 
        <EditFormSettings> 
            <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
            </EditColumn> 
        </EditFormSettings> 
    </MasterTableView>  
    <ClientSettings> 
        <Scrolling AllowScroll="True" UseStaticHeaders="true" /> 
    </ClientSettings> 
</telerik:RadGrid> 

search.ascx.vb
Protected Sub OnAjaxUpdate(ByVal sender As ObjectByVal args As ToolTipUpdateEventArgs) 
        Me.UpdateToolTip(args.Value, args.UpdatePanel) 
    End Sub 
 
    Private Sub UpdateToolTip(ByVal elementID As StringByVal panel As UpdatePanel) 
        Dim ctrl As Control = Page.LoadControl("~/UserControls/Beta/AgentDetails.ascx"
        panel.ContentTemplateContainer.Controls.Add(ctrl) 
 
        Dim details As UserControls_Beta_AgentDetails = DirectCast(ctrl, UserControls_Beta_AgentDetails) 
        details.AgentNumber = elementID 
    End Sub 
 
    Protected Sub radRadiusSearch_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles radRadiusSearch.ItemDataBound 
        If TypeOf e.Item Is GridDataItem Then 
            Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) 
            Dim strAN As String = item("AgentNumber").Text 
            Dim strMiles As String = item("Miles").Text 
            Dim intMiles As Integer = 0 
            Dim strOA As String = item("DP3_OA_COUNT").Text 
            Dim strHLG As String = item("DP3_HLG_COUNT").Text 
            Dim strDA As String = item("DP3_DA_COUNT").Text 
            Dim strQ4 As String = item("DP3_Q4_PERC").Text 
            Dim strQ5 As String = item("DP3_Q5_PERC").Text 
            Dim strQ6 As String = item("DP3_Q6_PERC").Text 
            Dim strQ7 As String = item("DP3_Q7_PERC").Text 
            Dim strQ8 As String = item("DP3_Q8_PERC").Text 
            Dim strQlty As String = item("QltyRatingDisplay").Text 
            Dim target As Control = e.Item.FindControl("targetControl"
            Dim targetLink As HyperLink = e.Item.FindControl("targetControl"
            targetLink.NavigateUrl = "~/Tools/RadiusSearch-DP3/ShowAgent.aspx?AgentNumber=" & strAN 
            If Not [Object].Equals(target, NothingThen 
                If Not [Object].Equals(Me.radTTM, NothingThen 
                    Me.radTTM.TargetControls.Add(target.ClientID, (TryCast(e.Item, GridDataItem)).GetDataKeyValue("AgentNumber").ToString(), True
                End If 
            End If 
            If Len(strMiles) > 0 Then intMiles = CInt(strMiles) 
            item("Miles").Text = Math.Round(intMiles) 
            strQlty = Replace(strQlty, "-ACCEPTABLE"""
            strQlty = Replace(strQlty, "-UNKNOWN"""
            strQlty = Replace(strQlty, "-UNACCEPTABLE"""
            item("QltyRatingDisplay").Text = strQlty 
        End If 
    End Sub 
 
    Protected Sub radRadiusSearch_ItemCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles radRadiusSearch.ItemCommand 
        If e.CommandName = "Sort" OrElse e.CommandName = "Page" Then 
            radTTM.TargetControls.Clear() 
        End If 
    End Sub 
 
    Protected Sub Page_PreRender(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.PreRender 
        'Version 2 - 5/6/2010 
        radRadiusSearch.PageSize = 25 
        radRadiusSearch.ClientSettings.Scrolling.SaveScrollPosition = False 
        radRadiusSearch.ClientSettings.Scrolling.FrozenColumnsCount = 2 
 
        If IsPostBack Then 
            Dim strZip As String = radZip.Text 
            Dim strCity As String = radCity.Text 
            Dim strState As String = radState.Text 
            Dim strMiles As String = radMiles.Text 
 
            Dim sqlConn As New SqlConnection 
            Dim sqlCmd As New SqlCommand 
 
            sqlConn.ConnectionString = ConfigurationManager.ConnectionStrings("zip_codesConnectionString").ConnectionString 
            sqlConn.Open() 
 
            If (Len(strZip) > 0 And Len(strMiles) > 0) Or (Len(strCity) > 0 And Len(strState) > 0 And Len(strMiles) > 0) Then 
                If Len(strZip) > 0 Then 
                    sqlCmd = New SqlCommand("_Radius_AgentSearch_DP3_ByZip", sqlConn) 
                    sqlCmd.CommandType = Data.CommandType.StoredProcedure 
                    sqlCmd.Parameters.AddWithValue("@ZipCode", strZip) 
                    sqlCmd.Parameters.AddWithValue("@Miles", strMiles) 
                Else 
                    sqlCmd = New SqlCommand("_Radius_AgentSearch_DP3_ByCityState", sqlConn) 
                    sqlCmd.CommandType = Data.CommandType.StoredProcedure 
                    sqlCmd.Parameters.AddWithValue("@City", strCity) 
                    sqlCmd.Parameters.AddWithValue("@State", strState) 
                    sqlCmd.Parameters.AddWithValue("@Miles", strMiles) 
                End If 
 
                radRadiusSearch.DataSource = sqlCmd.ExecuteReader 
                radRadiusSearch.DataBind() 
                radRadiusSearch.Visible = True 
            Else 
                radRadiusSearch.Visible = False 
            End If 
 
        End If 
    End Sub 
 
    Protected Sub cmdSubmit_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles cmdSubmit.Click 
        radRadiusSearch.CurrentPageIndex = 0 
    End Sub 


Dimo
Telerik team
 answered on 13 May 2010
5 answers
256 views
I have a RadGrid that I am establishing cell styles in the itemdatabound method.  I export this grid to Excel .
     <ExportSettings HideStructureColumns="true" ExportOnlyData="false" IgnorePaging="true" Excel-Format="ExcelML" OpenInNewWindow="true" > 
     </ExportSettings> 
How do I preserve the cell styles (color, text color, bolding, etc ) that I set in the grid .
Maria Ilieva
Telerik team
 answered on 13 May 2010
1 answer
88 views
Hi,
I have a RadDatePicker inside a radwindow.
I am facing an issue with the RadDatePicker.
At the first time when I open the Radwindow it is showing the Calendar image properly. From the second time onwards whenever I open the window, it showing the Hyperlink text "Open the calendar pop up" instead of the Calendar image.
I am not sure why i am facing the issue.

Let us know that why this is happening and what might be the solution.

Thanks
Chandra
Mira
Telerik team
 answered on 13 May 2010
1 answer
130 views
Hello there, im testing the radgrid for a project, we are not using wizard to generate datasource so we manually paginate and sort, all works fine until i change page size, we have set page size=10, i select page size 20 and takes too long to load then i get error PageRequestManagerTimeoutException, then i return to select my 10 page size and i also get that error
what could be wrong?

i am binding the radgrid wih a class created after store procedures.
thanks! sorry for the bad english
Pavlina
Telerik team
 answered on 13 May 2010
5 answers
304 views
Hi,

Im trying to use rad tooltips to show html articles (that I store on a database) on multiple pages of a CMS.

Basically giving my client the ability to show articles everywhere just by using a tag with the respective ID.

So on the code I'd like to replace the "tooltip calling tag" with the actual tooltip code.

I managed to do the following so far:


<form runat="server"
 
<telerik:RadScriptManager ID="ScriptManager1" runat="server"  
    EnableTheming="True" OutputCompression="AutoDetect"
</telerik:RadScriptManager> 
 
 
<script type="text/javascript"
 function showToolTip(element) { 
     var tooltipManager = $find("<%= RadToolTipManager1.ClientID %>"); 
 
     if (!tooltipManager) return; 
 
     var tooltip = tooltipManager.getToolTipByElement(element); 
 
     if (!tooltip) { 
         tooltip = tooltipManager.createToolTip(element); 
     } 
 
     element.onmouseover = null
     tooltip.show(); 
 } 
</script> 
 
<telerik:RadToolTipManager ID="RadToolTipManager1" 
  Width="" 
  HideEvent="ManualClose" 
  RelativeTo="Element" 
  Position="BottomCenter" 
  runat="server" 
  Autotooltipify="false" 
  OffsetY="0" Sticky="True" Font-Bold="False" Title="Knowledge Database Helper"
</telerik:RadToolTipManager> 
 
<img title="<div><i>testing html</i></div><br/>" alt="test" src ="../template/images/knowledge.gif" ID="rad<%=id %>" onmouseover='showToolTip(this);' /> 
 
 
</form> 

The HTML code under the title tag would be gathered from the DB.

Is there any better way to populate tooltips with the HTML content without using the title attribute? because I also need to look at this code from the SEO point-of-view..

Thank you in advance.
Petio Petkov
Telerik team
 answered on 13 May 2010
1 answer
65 views
Am using Telerik Grid Hierarchy, In that, dynamically load DetailTableDataBind and its in expand mode. When i click link inside the  expand mode grid and its redirect to another page. then am clicking back button i want to open in  expand mode. but all shows in collapse mode. how to take session, which one in expand mode and take to another page and pass value to Grid Hierarchy page to expand mode.
Tsvetoslav
Telerik team
 answered on 13 May 2010
1 answer
130 views
Hi all,
I am having a RadGrid with one GridTemplateColumn with <ItemTemplate> as  <telerik:RadBinaryImage>
here databinding is like

<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="IPH_PHOTO">
                                       <ItemTemplate>
                                          <telerik:RadBinaryImage ID="imgInm" runat="server" DataValue='<%# Eval("IPH_PHOTO")%>' Height="75px" Width="75px" />
                                        </ItemTemplate>                                                                            
 </telerik:GridTemplateColumn>
    column IPH_PHOTO contains system.byte[].
My problem is, After binding grid with large number of data when i do anything(eg,changing pagesize or like that) script error is coming like this "
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12031" and the page hangs..If the number of data is less no problem occurs...The problem is for large data..
Please give solutions
Thanks in advance
Lekha

Rosen
Telerik team
 answered on 13 May 2010
1 answer
195 views
Hi, from Bogota, Colombia.

My question is about input masks, and how to apply it in a column.

I have a RadGrid with some columns, numeric and character, but numbers are hold in database as varchar (SQL Server).

I want t know, if are there any validation that i can apply to a column data (GridBoundColumn) in order that it validate that "numeric" columns accept only numbers (0-9) and the character columns accept only characters. For example, the character column must accept "John Paul II" or "Benedict XVI", must not accept "John Paul 2" or "Benedict 16" . A similar way for "numeric" columns.

Thanks in advance, and please forgive mistakes. English is not my native languaje.

CARLOS ALBERTO CASTILLO
Software Developer
Bogota, Colombia. 
Suresh K
Top achievements
Rank 1
 answered on 13 May 2010
5 answers
112 views
I have tons of textboxes and datepickers. I tried pointing the IDs of the datepickers to the target input of Textboxsettings for required field validation but it seems it does not work.

I know that I can use a normal asp.net validation but I like the way textboxsetting shows the validation message inside the textbox which is not (straightforward) possible in a normal asp.net validation control. 
Web team
Top achievements
Rank 1
 answered on 13 May 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?