Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
137 views
We have a web forms page with multiple rad editors on it.  All editors have the ContentFilter property set to "DefaultFilters".  Upon clicking a postback button, there is a lag in the submission due to the contentfilters of the radEditors being applied.  

I am trying to optimize performance by only turning on those filters that are necessary to insure XHTML compliance of the output.  There is a filter titled "ConvertToXhtml".  Additionally, there are filters titled "ConvertFontToSpan" and "FixUlBoldItalic".  If I have "ConvertToXhtml" turned on, are these other two filters redundant, since when you convert the content to XHTML, won't it convert <font> and <u> tags to <span> tags?  If so, should I just apply the "ConvertToXhtml" filter and turn these other two filter off?

Also, I have followed your guideline on optimizing RadEditor performance (for example, http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-performance-issue.aspx and http://www.telerik.com/support/kb/aspnet-ajax/editor/radeditor-loads-slowly-high-cpu-utilization.aspx).  Do you have any other recommendations for speeding up the processing of the RadEditor content by the ContentFilters?

Thanks so much for your assistance.

Joe
Rumen
Telerik team
 answered on 05 May 2010
1 answer
131 views
Hello,

I'm using Q1 2010

I have implemented a RadGrid as follows:

<telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server">  
  <telerik:RadGrid ID="Grid1" runat="server" ShowStatusBar="True" AllowPaging="true" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" 
  
Skin="Black" OnItemDataBound="Grid1_ItemDataBound">  
                <MasterTableView Width="100%" ShowHeader="true" CommandItemDisplay="None" ShowFooter="true" DataKeyNames="itm_TableID" ClientDataKeyNames="itm_TableID" DataSourceID="SqlDataSource1" PageSize="10" 
AutoGenerateColumns="False" Dir="RTL" AllowSorting="true" TableLayout="Fixed" PagerStyle-AlwaysVisible="true">  
                    <Columns> 
                        <telerik:GridBoundColumn UniqueName="itm_TableID" DataField="itm_TableID" HeaderText="ID" ReadOnly="true" HeaderStyle-Width="2%" Display="false">  
                        </telerik:GridBoundColumn> 
                          
                        <telerik:GridTemplateColumn UniqueName="CategorySelect" ItemStyle-Width="3%">                              
                            <ItemTemplate> 
                                <asp:CheckBox id="chkCategorySelect" OnCheckedChanged="chkCategorySelect_Click" AutoPostBack="True" runat="server" CssClass="checkBox"></asp:CheckBox> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
 
                        <telerik:GridBoundColumn UniqueName="itm_ID" DataField="itm_ID" HeaderText="" ReadOnly="true" HeaderStyle-Width="3%" ItemStyle-Width="3%" HeaderStyle-HorizontalAlign="Right">                              
                        </telerik:GridBoundColumn> 
      
                        <telerik:GridBoundColumn UniqueName="itm_VTR" DataField="itm_VTR" HeaderText="VTR" HeaderStyle-Width="3%" ItemStyle-Width="3%" HeaderStyle-HorizontalAlign="Right">  
                            <HeaderStyle Width="3%"></HeaderStyle> 
                        </telerik:GridBoundColumn> 
 
                        <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="" HeaderStyle-Width="15%" ItemStyle-Width="15%" FooterStyle-Width="15%" FooterStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Right">  
                            <FooterTemplate> 
                                <telerik:RadTextBox ID="txtTotalTime" Runat="server" Skin="Black" Label="" Width="120px" ReadOnly="true"> 
                                </telerik:RadTextBox> 
                           </FooterTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="lblRemarks" runat="server" Text='<%# Bind("itm_Remarks", "{0}") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn>                                                                          
                    </Columns>    
                    <PagerTemplate> 
                      <div style="direction: rtl;">  
                        <asp:Panel ID="PagerPanel" Style="padding: 6px; line-height: 24px;" runat="server" Direction="RightToLeft">  
                          <asp:Button ID="btnAdd" runat="server" Width="100px" Text="" CssClass="" Enabled="true"  OnClick="btnAddToCategory_Click" /> 
                         
                           <asp:Panel runat="server" ID="NumericPagerPlaceHolder" Direction="RightToLeft"/>  
                         
                        </asp:Panel> 
                      </div> 
                    </PagerTemplate> 
                           
                    <PagerStyle Mode="NumericPages" Position="TopAndBottom" HorizontalAlign="Center" /> 
                </MasterTableView>                  
                <ClientSettings AllowRowsDragDrop="false" EnableRowHoverStyle="false"  EnablePostBackOnRowClick="false">                     
                    <Selecting AllowRowSelect="false" EnableDragToSelectRows="false" /> 
                    <Resizing AllowColumnResize="false" ClipCellContentOnResize="true" /> 
                      
                </ClientSettings> 
                <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu> 
           </telerik:RadGrid> 
          
        </telerik:RadAjaxPanel>  
with this code behind:
 protected void Page_Load(object sender, EventArgs e)  
        {             
        }  
 
 DateTime totalTime = new DateTime();                  
 
        protected void Grid1_ItemDataBound(object sender, GridItemEventArgs e)  
        {  
            if (e.Item is GridDataItem)  
            {  
                GridDataItem dataItem = (GridDataItem)e.Item;  
             
                totalTime = totalTime.AddSeconds(Double.Parse(dataItem["itm_VTR"].Text));  
                                 
            }  
            else if (e.Item is GridFooterItem && endTime < castLength)  
            {  
                GridFooterItem footer = (GridFooterItem)e.Item;  
                (footer["TemplateColumn"].FindControl("txtTotalTime"as RadTextBox).Text = totalTime.ToString("HH:mm:ss");  
            }  
        }  
 
        

My problem is with the calculation(see code behind in Grid1_ItemDataBound),  which are displayed in "txtTotalTime" textbox, without paging the calculations work fine. However with paging, each page of the grid behaves like an independent grid and on each page i get the calculations of items of the current page only and not for the entire grid. I need to see on each page of the grid the calculation of all items of the grid.

I would appreciate any help.

Best Regards
Yuri
Pavlina
Telerik team
 answered on 05 May 2010
2 answers
105 views
Hello,

I have a RadGrid which uses the NeedDataSource event to allow the built in filtering to work. I need some client side code to run when the grid reloads with the filtered results, or, as each row is removed/added. The description of the events is pretty vague, for example, http://www.telerik.com/help/aspnet-ajax/grid_onrowcreated.html, does not specify if the event is only meaningful for client-side data binding, whereas I know some methods do.

So the question is, how can I respond to a grid in javascript when it has been or is being filtered? The end result is to update an image gallery that corresponds to the grid, any rows that get filtered out have their images in the gallery hidden and vice-versa.


Regards,
Mark Leavesley
mark leavesley
Top achievements
Rank 1
 answered on 05 May 2010
1 answer
100 views
Hi,

I have to manage a folder containing 1600 documents (pdf). I set the following properties:

<

 

telerik:RadFileExplorer ID="RadFileExplorer1" Height="450px" Width="400px" TreePaneWidth="150px"

 

 

EnableViewState="false"

 

 

runat="Server"

 

 

EnableOpenFile="false"

 

 

AllowPaging="false"

 

 

 

 

/>

In my Web.config file the option <compliation debug="false">

How can I increase the performance of control?


Regards

Giuseppe
Fiko
Telerik team
 answered on 05 May 2010
2 answers
775 views
Hi,

I've a requirement to get all the submenu items of a selected menu item till the deepest level whichever is available for that selected menu items. I mean is there any way to get all child sub-menu items and the grandchildren sub-menu items and so on for the selected menu item or is there any way to know the maximum/deepest level of a selected menuitem. As far as i've come across we can only go down the immediate next level of selected menu item. My requirement is to get and store DataFieldID of the selected menu item and all its available child menu items irrespective of the levels it has. Could you please provide me some sample code on this?

Regards,
kk
Veronica
Telerik team
 answered on 05 May 2010
2 answers
232 views

I read this http://www.telerik.com/help/aspnet-ajax/grdskins.html  and it seems I can use the Telerik icons in HTML, I need to do some customization on RadGrid.

 

Anyone knows how to use it in an ASPX page?  Since it is already embedded in web resource already.

<img  src="......[some web resource path]....Edit.gif" />

Of course the stupid way is to download all images in my web application and reference it as   ~/Images/Edit.gif.   


Thanks

 

 

Rini Boo
Top achievements
Rank 1
 answered on 05 May 2010
2 answers
111 views
I have a form with a grid in it that uses a LinqDataSource. The Selecting event is wired up to return the number of rows. I use a RadAjaxManager and a RadAjaxLoadingPanel. However, when I click on a paging control the grid "flashes" and the loading "wheel" does not appear like the 300,000 Linq demo shows. The paging does work though. How do I make the loading stuff work? I have supplied the code for a cutback version of what I am doing in a real web app.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm8.aspx.cs" Inherits="CharityCheck.WebForm8" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
 
<!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>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <asp:Panel ID="Panel1" runat="server">  
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server" ScriptMode="Release" /> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" > 
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"   
                Skin="Office2007" GridLines="None"   
                AutoGenerateColumns="False"   
                DataSourceID="LinqDataSource1" > 
                <MasterTableView TableLayout="Fixed" > 
                    <Columns> 
                        <telerik:GridBoundColumn DataField="CompanyName" DefaultInsertValue=""   
                            HeaderText="CompanyName" SortExpression="CompanyName"   
                            UniqueName="CompanyName" ReadOnly="True" > 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn DataField="ID" DefaultInsertValue="" 
                            HeaderText="ID" SortExpression="ID" UniqueName="ID"   
                            DataType="System.Int32" ReadOnly="True">  
                        </telerik:GridBoundColumn> 
                    </Columns> 
                </MasterTableView> 
                <ClientSettings>    
                    <selecting allowrowselect="True" /> 
                </ClientSettings>    
                <PagerStyle Position="TopAndBottom" /> 
            </telerik:RadGrid> 
 
            <asp:LinqDataSource ID="LinqDataSource1" runat="server"   
                AutoPage="False" ContextTypeName="CharityCheck.CharityCheckEntities"   
                onselecting="LinqDataSource1_Selecting"   
                TableName="CompanySet" OrderBy="CompanyName"   
                Select="new (CompanyName, ID)">  
            </asp:LinqDataSource> 
        </asp:Panel>         
    </div> 
    </form> 
</body> 
</html> 
 
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Infragistics.WebUI.UltraWebGrid;  
using Telerik.Web.UI;  
 
namespace CharityCheck  
{  
    public partial class WebForm8 : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
        }  
 
        protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)  
        {  
            CharityCheckEntities entities = new CharityCheckEntities();  
            var data = from company in entities.CompanySet  
                       select company;  
            e.Arguments.TotalRowCount = data.Count();  
        }  
    }  
}  
 
David Simmonds
Top achievements
Rank 1
 answered on 05 May 2010
3 answers
102 views


Hi,

I am facing a strange issue with RadTextBox: I have a RadtextBox inside a RadGrid, when I click a button(outside the Grid) the value in the Textbox vanishes, it isnot maintaining the value. why is it so?

Another point to note is, this happens only for IE 8, the textbox is maintaining its value in IE 6.

What could be the reason?

Please let me know the solution for this issue...

-Liji Gilesh 
Nikolay Rusev
Telerik team
 answered on 05 May 2010
9 answers
770 views
Hello,

I am trying to hook a RadScheduler up to a WebService, but cannot even get the page to render, even after following these directions to the letter. Some relevant facts: I am using VS 2010 b2 and IIS7. I've tried this in both a WebForms project and an MVC project, and I get the same error each time. I'll post the stack trace below. Let me know if there's any other information I can provide you.

Thanks,

Daniel

Stack trace:
Server Error in '/' Application.

An entry with the same key already exists.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: An entry with the same key already exists.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[ArgumentException: An entry with the same key already exists.]
   System.Collections.Specialized.ListDictionary.Add(Object key, Object value) +7689715
   System.Web.UI.ClientScriptManager.RegisterExpandoAttribute(String controlId, String attributeName, String attributeValue, Boolean encode) +337
   System.Web.UI.ScriptRegistrationManager.RegisterExpandoAttribute(Control control, String controlId, String attributeName, String attributeValue, Boolean encode) +115

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +639
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +3262
   System.Web.UI.WebControls.ValidatorCompatibilityHelper.RegisterExpandoAttribute(Control control, String controlId, String attributeName, String attributeValue, Boolean encode) +333
   System.Web.UI.WebControls.BaseValidator.AddAttributesToRender(HtmlTextWriter writer) +381
   System.Web.UI.WebControls.RequiredFieldValidator.AddAttributesToRender(HtmlTextWriter writer) +25
   System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +32
   System.Web.UI.WebControls.BaseValidator.Render(HtmlTextWriter writer) +512
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   Telerik.Web.UI.SchedulerFormContainer.Render(HtmlTextWriter writer) +453
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   Telerik.Web.UI.RadScheduler.RenderContents(HtmlTextWriter writer) +65
   Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +127
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315
   System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5274

Version Information: Microsoft .NET Framework Version:4.0.30128; ASP.NET Version:4.0.30128.1
Mike Taylor
Top achievements
Rank 1
 answered on 05 May 2010
3 answers
148 views
I think I've found a bug with the 2008.1.415 grid.  Here's a very simple sample:

<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" 
        Skin="Default" OnNeedDataSource="RadGrid1_NeedDataSource"
    <MasterTableView Width="100%"
    </MasterTableView> 
    <ClientSettings EnableRowHoverStyle="true"
        <Resizing AllowRowResize="false" /> 
    </ClientSettings> 
</telerik:RadGrid> 
 

I noticed that EnableRowHoverStyle will cause flickering when moving the cursor between *columns* (hover color turns off, then turns on again immediately).  If the cursor stays on the same row, but I move from column to column within that row, the hover highlighting should not be flickering, but it does.

However, if AllowRowResize is enabled, for whatever reason, this flickering does not happen!  The Grid demo page (the skin chooser) which has row hover enabled also has row resize enabled, so the flicker isn't seen in the demos.


Pavel
Telerik team
 answered on 05 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?