Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
312 views

This problem just started happening about a month ago. For an
unknown reason, “some”, not all of our users are having issues with our website,
the application just hangs up for the most part,  for 10 to 15, so they say, and then the app
starts working.  The only common thing we’ve
found among them to resolve this issue is to disable their antivirus, or add an
exception to our URL. After doing that, all seems to work as expected.

We are using the latest version of controls 2014.1.225.40
 
We have disabled the antivirus on the clients with AVG,Trends and Kaspersky.  It also doesn’t
seem to be specific to a given browser, IE, Chrome, FireFox, etc.

We have not had this happen locally, just with remote customers.

Any help in trying to chase this down would be greatly appreciated.

Roger

Marin Bratanov
Telerik team
 answered on 17 Mar 2014
7 answers
94 views

Hi,

I want to use several RadEditor on my web page.  I started using the solution 1 of this page:
http://www.telerik.com/support/kb/aspnet-ajax/editor/setting-hidden-radeditor-in-edit-mode-on-click-and-putting-it-in-non-editable-mode-onblur.aspx

It works fine if I set one Radeditor on the page, but if I add another RadEditor on the page, it does not work.

The reproduce the problem, I paste text in the first RadEditor (works fine), but if I paste the same text on the second control (without reloading the page), I meet a "Stack overflow". I'm using IE9.

My telerik version :
Telerik.Web.Design, 2013.1.220.40
Telerik.Web.UI, 2013.1.220.40
Telerik.Web.UI.Skins, 2013.1.220.40

I attach a picture of the result and a sample of my web page (see below).

Can you tell me what I am doing wrong??

Thank you

Steeve

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="_Test2.aspx.cs" Inherits="Web._Test2" %>
<%@ 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">
 
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <meta http-equiv="X-UA-Compatible" content="IE=8"/>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
 
        <div id="lContent" style="background-color: lightblue;">First RadEditor</div>  
     
        <div style="display:none" id="tContent">  
            <telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoadMandate">  
                    <Content></Content>  
            </telerik:RadEditor
        </div>
     
        <br/><br/><br/>
     
        <div id="div1" style="background-color: lightgray;">Second RadEditor</div>  
     
        <div style="display:none" id="div2">  
            <telerik:RadEditor runat="server" ID="RadEditor2" OnClientLoad="OnClientLoadProjectDesc">  
                    <Content>RadEditor 2</Content>  
            </telerik:RadEditor
        </div>
        <telerik:RadCodeBlock ID="radCodeBlock" runat="server">
 
            <script type="text/javascript">
                var lContent, tContent;
                lContent = $get('lContent');
                tContent = $get('tContent');
                $addHandler(lContent, "click", lContent_Click);
 
 
                var div1, div2;
                div1 = $get('div1');
                div2 = $get('div2');
                $addHandler(div1, "click", div1_Click);
         
                function OnClientLoadMandate(editor, args) {
                    var topZone = $get(editor.get_id() + "Top");
                    topZone.setAttribute("unselectable", "on");
                    topZone.setAttribute("MozUserSelect", "none");
 
                    var buttons = topZone.getElementsByTagName("*");
                    for (var i = 0; i < buttons.length; i++) {
                        var a = buttons[i];
                        a.setAttribute("unselectable", "on");
                        a.style.MozUserSelect = "none";
                        a.style.MozUserFocus = "none";
                        a.style.MozUserFocus = "ignore";
                    }
                 
                    var element = document.all ? editor.get_document().body : editor.get_document();
                    $telerik.addExternalHandler(element, "blur", function(e)  
                    {  
                        var labelUpdated;  
                        var editorContent = editor.get_html(true);  
                        if (lContent.textContent == editorContent)  
                            labelUpdated = false;  
                        else  
                            labelUpdated = true;  
             
                        lContent.innerHTML = editorContent;  
                        tContent.style.display = 'none';  
                        lContent.style.display = '';  
     
                        if (labelUpdated)   
                        {  
                            //alert('Updating... ' + editorContent);  
                        }  
                    });  
                }  
     
                function lContent_Click()  
                {  
                    lContent.style.display = 'none';  
                    tContent.style.display = '';  
       
                     var editor = $find("<%=RadEditor1.ClientID%>"); //get a reference to RadEditor client object  
                     editor.setFocus(); //set the focus on the the editor  
                     editor.set_html(lContent.innerHTML);
                 }
 
 
                 function OnClientLoadProjectDesc(editor, args) {
                     var topZone = $get(editor.get_id() + "Top");
                     topZone.setAttribute("unselectable", "on");
                     topZone.setAttribute("MozUserSelect", "none");
 
                     var buttons = topZone.getElementsByTagName("*");
                     for (var i = 0; i < buttons.length; i++) {
                         var a = buttons[i];
                         a.setAttribute("unselectable", "on");
                         a.style.MozUserSelect = "none";
                         a.style.MozUserFocus = "none";
                         a.style.MozUserFocus = "ignore";
                     }
 
                     var element = document.all ? editor.get_document().body : editor.get_document();
                     $telerik.addExternalHandler(element, "blur", function (e) {
                         var labelUpdated;
                         var editorContent = editor.get_html(true);
                         if (div1.textContent == editorContent)
                             labelUpdated = false;
                         else
                             labelUpdated = true;
 
                         div1.innerHTML = editorContent;
                         div2.style.display = 'none';
                         div1.style.display = '';
 
                         if (labelUpdated) {
                             //alert('Updating... ' + editorContent);
                         }
                     });
                 }
      
 
                 function div1_Click() {
                     div1.style.display = 'none';
                     div2.style.display = '';
 
                     var editor = $find("<%=RadEditor2.ClientID%>"); //get a reference to RadEditor client object  
                     editor.setFocus(); //set the focus on the the editor  
                     editor.set_html(div1.innerHTML);
                 }
            </script>
 
        </telerik:RadCodeBlock>
 
    </form>
</body>
</html>

 

 

 

Steeve
Top achievements
Rank 1
 answered on 17 Mar 2014
8 answers
103 views
Hi,

The radeditor flickers a lot when using IE, when setting ContentMode to Div and using AutoResize to fit content height.

See the following sample:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
 
<!DOCTYPE html>
 
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow: auto">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <telerik:RadEditor ID="re2" runat="server" AutoResizeHeight="True" ContentAreaMode="Div">
                <Content>
                    Some text<br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    Delete this row!
                    <br />
                    <br />
                    <br />
                    Some more text
                </Content>
             </telerik:RadEditor>
        </div>
    </form>
</body>
</html>

Scroll down to the bottom and delete the line "Delete this row!", the entire page scrolls to the top of the Editor...

I have located the root of this behavior, it has to do with setFocus. Doing the following hack (commenting out the setFocus line):
<script type="text/javascript">
            Telerik.Web.UI.RadEditor.prototype.executeCommand = function (radCommand, setFocus, addToStack)
            {
                //Set the editor's window
                if (!radCommand.get_window())
                {
                    radCommand.set_window(this.get_contentWindow());
                }
 
                //if (false != setFocus && !this.isOpera) this.setFocus(); //Opera has a problem! Typing is discontinued.
                this._commandsManager.execute(radCommand, addToStack);
            }
        </script>

The Editor works really smooth after this hack, but of course this might have bad side effects...
This fix also makes typing at the bottom of the Editor really smooth an nice!!!

Is this something you can fix with a real solution?

Regards
Andreas
Andreas
Top achievements
Rank 1
 answered on 17 Mar 2014
0 answers
78 views
I've been able to recreate a problem using the latest version of Chrome (Version 34.0.1847.60 beta-m) and 2013.2.717.40.

I have the OnClientAppointmentClick handler wired up to my appointments with the following function


1.function editAppointment(sender, e) {
2.    var apt = e.get_appointment();
3.    sender.editAppointmentWithConfirmation(apt);
4.}

Although I've found that when dragging an appointment to resize it, not every time, but most times, the Edit Appointment dialog will appear and the resize is not successful.

Perhaps a bug? I'm unable to recreate the problem currently in the latest version of Firefox (27.0.1). I've also had others who use our application report the problem using the latest in the STABLE Chrome channel
David
Top achievements
Rank 1
 asked on 17 Mar 2014
3 answers
173 views
There is an odd behavior only in IE 9, where the SearchContext combo expands to fill the entire search box.  The search text and icon are then shifted to the far right.  This happens when you first hover over the search box, and only in IE 9.  Firefox, IE 8, 10 and 11 do not exhibit this behavior.  You can see the result of this behavior in the two attached files:  Quirky.gif (see aspx source below), and from the Telerik Demo page.

Any ideas on why this happening in IE 9?  I have too many users with IE 9 to just ignore it.
Thanks!
Dave
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test2.aspx.cs" Inherits="InsureHubWeb.Test2" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" EnablePageMethods="true" runat="server">
            <Services>
                <asp:ServiceReference path="~/WS/wsIHExplorer.asmx" />
            </Services>
        </telerik:RadScriptManager>
  
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Default" ShowChooser="false" />
  
        <telerik:RadSearchBox ID="RadSearchBox1" runat="server" 
            EnableAutoComplete="false"
            EnableViewState="false"
            Width="500" 
            Label="Look In:"
            EmptyMessage="Enter name or part of name"
        >
            <SearchContext ShowDefaultItem="false">
                <Items>
                    <telerik:SearchContextItem Text="This Folder" Key="1" />
                    <telerik:SearchContextItem Text="All Folders" Key="2" />
                </Items>
            </SearchContext>
        </telerik:RadSearchBox
    </form>
</body>
</html>
Aneliya Petkova
Telerik team
 answered on 17 Mar 2014
2 answers
200 views
Hello,

I've got a RadMultiPage that displays it's RadPageViews based on a tab selected in a RadTabStrip.
What I want to know is if every RadPageView loads all at once (When the RadMultiPage loads) or do they load individually based on the tab that is selected in the RadTabStrip.

I am trying to create a wizard and I want to know if it would be wise to use the RadPageView_Load event to handle methods for an individual RadPageView.
Say I have a RadPageView called "Step2RadPageView". What if I wanted to run certain methods ONLY when this PageView is Selected?

Similar to using a normal asp.net MultiView and using the View.Activate event.

Thanks in advance.
Cody
Top achievements
Rank 1
 answered on 17 Mar 2014
3 answers
65 views
I'm creating a new project and including the RadEditor with it. I'm experiencing 2 issues and I hope that you can help me with these. The first issue is that when I declare the DeletePaths, UploadPaths and ViewPaths with "~/Images/Sections" I get the error "Invalid characters in the filename", however it takes me to that folder after the error. If I change the path to "~/Images" it works without the error. The second issue is that the upload and delete buttons are disabled. For all the other Managers (ie, documents, flash, media and templates) everything works?

Here is where I declare my paths
<ImageManager DeletePaths="~/Images/Sections" MaxUploadFileSize="1000000" UploadPaths="~/Images/Sections" ViewPaths="~/Images/Sections" />

Here is the code behind
Dim imagepath() As String = {"~/Images/Sections"}
 
If Not IsPostBack Then
    RadEditor1.ImageManager.ViewPaths = imagepath
End If

I've spent hours going over the forum and trying everything, but nothing seems to work. All my work so far has been on the localhost.

William
Ianko
Telerik team
 answered on 17 Mar 2014
2 answers
113 views
Hello,
I have a RadHtmlChart in which i dinamically create LineSeries. I have successfully set Chart.PlotArea.YAxis.MaxValue and Chart.PlotArea.YAxis.MinValue, but XAxis.MinValue does not work. I'd like to start the series in a way that the first value "thouches" the y-axis. Because in xaxis i have 2006 as first year, I tried to set XAxis.MinValue = 2006, but I always got a gap between the y-axis and the first value in the chart (it seems that the start of xaxis is the half of 2005). I see the same gap at the end of the chart.

In attachment the screenshot of chart.

Thanks
Danail Vasilev
Telerik team
 answered on 17 Mar 2014
2 answers
159 views
The Example of keeping the expanded/collapse state of groups that Telerik provide uses the viewstate. If you have viewstate disabled, it causes a few kinks. Since I had to write this myself, I figured I'd share in case anyone needed it.

These two were in a class call telerikhelpers but you could put them anywyere
    /// <summary>
/// this loads the saved states of the group headers
/// (whether they were collapsed or expanded) you have to pass in the
/// grid you want to bind
/// </summary>
/// <param name="grid">the grid you want to bind</param>
public static void LoadGroupsExpandedState(RadGrid grid)
{
    var listCollapsedIndexes = HttpContext.Current.Session[grid.ID] as ArrayList;
 
    if (listCollapsedIndexes != null)
    {
        foreach (GridItem item in grid.MasterTableView.GetItems(GridItemType.GroupHeader))
        {
            if (listCollapsedIndexes.Contains(item.RowIndex))
            {
                item.Expanded = false;
            }
        }
    }
}//LoadGroupsExpandedState
 
/// <summary>
/// this function sets a session variable to remember which grouping items have been
/// collapsed or expanded
/// </summary>
/// <param name="grid"></param>
/// <param name="curItem"></param>
public static void SaveGroupsExpandedState(RadGrid grid, GridItem curItem)
{
    GridItem[] groupItems = grid.MasterTableView.GetItems(GridItemType.GroupHeader);
    if (groupItems.Length > 0)
    {
 
        var listCollapsedIndexes = new ArrayList();
 
        //if this first one is true, then we need to add it to the list
        //basically the state that is getting passed in is the old state
        //so if it's expanded = true, then it was expanded, and it's
        //getting collapsed
        if (curItem.Expanded)
        {
            listCollapsedIndexes.Add(curItem.RowIndex);
        }//if curItemExpanded
        else
        {
            //check if it's in the list
            if (listCollapsedIndexes.Contains(curItem.RowIndex))
            {
                listCollapsedIndexes.Remove(curItem.RowIndex);
            }//if listCollapse
        }//else
 
 
        foreach (GridItem item in groupItems)
        {
            if (!item.Expanded && item.RowIndex != curItem.RowIndex)
            {
                listCollapsedIndexes.Add(item.RowIndex);
            }
        }
        HttpContext.Current.Session[grid.ID] = listCollapsedIndexes;
    }
}//SaveGroupsExpandedState


Then attach these two functions to your itemdatabound and databound events on the acutal grid itself

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    //get the grid
    RadGrid grid = sender as RadGrid;
 
    //if this is expand or collapse, save the state
    if (e.CommandName == RadGrid.ExpandCollapseCommandName)
    {
        TelerikHelpers.SaveGroupsExpandedState(grid, e.Item);
    }
 
}//ItemCommand
 
/// <summary>
/// This method adds logic on how to handle a databound (restore the grouping set on screen)
/// </summary>
///The parameter is not used.
///The parameter is not used.
protected void RadGrid1_DataBound(object sender, EventArgs e)
{
    TelerikHelpers.LoadGroupsExpandedState(sender as RadGrid);
}

If you make the first two accessible globally, you can literally attach multiple grids on a page to the same databound and item command events and it will just work. Hope this helps someone else!

Konstantin Dikov
Telerik team
 answered on 17 Mar 2014
3 answers
138 views
There are a few old threads up here - one from 2008 or 2009 stating that the RadGrid ExcelML export does not support line break characters.  Is this still the case?

I have a few cells that have line breaks I would like to bring through the ExcelML export - and have tried several approaches, but no luck.

Is this still an unsupported scenario?
Kostadin
Telerik team
 answered on 17 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?