Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
146 views
Hello,

I want to prevent users from editing certain sections in the content area. I've found a way to do it in IE7 but I don't have a good way to do it in Firefox.

Take this code for example:

<p>Regular text. Edit as normal.</p> 
<div aria-readonly="true">Don't touch me. Nobody gives you that right!</div> 
<p>Carry on editing.</p> 

When you're in design mode in IE, if you click the readonly section, it is uneditable. Firefox just ignores it.

I'm sure there's a better way to do this that works in all browsers. I just haven't come up with one.

Anyone have any ideas?

Thanks,
Jeff


Jeff
Top achievements
Rank 1
 answered on 24 Mar 2009
0 answers
118 views
Hi

I have a tooltip on each appointment in scheduler. When I drag an appointment and cancel drag in appointmentUpdate event using e.Cancel = true, I receive ths javascript error (line in bold). It seem to be in toolbar but I don't know why

Thanks

},_createUI:

function(){

 

if

 

(!this._popupElement){

 

var

 

_97=this.get_id();

 

var

 

_98="RadToolTipWrapper_"+_97;

 

var

 

_99=document.createElement("DIV");

 

_99.id=_98;

var

 

_9a=this.get_element();

 

var

 

_9b=_9a.parentNode?_9a:this._getDefaultParent();

 

ericc34
Top achievements
Rank 1
 asked on 24 Mar 2009
1 answer
193 views
Hi,

I'm basically using the RSS feed example from your demos. The only change I have to make is to set the DataSource in code since I'm putting it in a RadDock and the stupid XmlDataSource crashes on Page_Init if there is no DataFile set (which isn't known until Page_Load).

Everything works fine if I do this decalritively, but when setting the DataSource in code as below, the Rotator never loads any data and doesn't start rotating.

Any ideas what I am doing wrong?

The code-behind:
XmlDataSource xds = new XmlDataSource();
xds.DataFile = "http://blogs.telerik.com/Blogs.rss"; 
RadRotator1.DataSource = xds;
RadRotator1.DataBind();


The mark-up:

    <telerik:RadRotator ID="RadRotator1"
        RotatorType="AutomaticAdvance"
        AutoAdvance="True"
        Loop="True"
        ScrollDirection="Up"
        ScrollDuration="2000"
        FrameDuration="0"
        Width="360" Height="172"
        InitialItemIndex="-1"
        runat="server">
        <ItemTemplate>
            <div style="width: 360px; height: 42px; padding: 10px 10px 10px 10px; ">
                <strong><a target="_blank" href='<%# XPath("link") %>'>
                    <%# System.Web.HttpUtility.HtmlEncode(XPath("title").ToString())%>
                </a></strong>
                <br />
                <%# XPath("pubDate") %>
            </div>
        </ItemTemplate>
    </telerik:RadRotator>

-Al

 

 

 

 

apb
Top achievements
Rank 1
 answered on 24 Mar 2009
4 answers
188 views
Hi,

In IE 7, when we set "usestaticheaders=true" in "ClientSettings>Scrolling" in a grid and if there is a row with a lengthy name, it will truncate the item in that row and it is adding 3 dot's "..." at the end. But In Firefox 3,  it doesn't do that and it is overlapping with the text in the next column.

So how do we fix this in Firefox 3?

This is the grid we use:

 

<telerik:RadGrid ID="grdRadAssetHistory" runat="server" AllowPaging="False" AllowSorting="True"

 

 

AutoGenerateColumns="False" BorderWidth="1px" CellPadding="1" CellSpacing="1"

 

 

GridLines="None" GroupingEnabled="False" EnableEmbeddedSkins="false"

 

 

Skin="Web20" Style="margin-bottom: 0px" Width="650px"

 

 

MasterTableView-DataKeyNames="AssetId"

 

 

onneeddatasource="grdRadAssetHistory_NeedDataSource" CssClass="grid" >

 

 

<PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Left" PagerTextFormat=""></PagerStyle>

 

 

<HeaderStyle HorizontalAlign="Left" />

 

 

<ItemStyle HorizontalAlign="Left" />

 

 

<AlternatingItemStyle HorizontalAlign="Left" />

 

 

<ClientSettings AllowColumnsReorder="True">

 

 

<Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True">

 

 

</Resizing>

 

 

<Scrolling AllowScroll="True" SaveScrollPosition="True" ScrollHeight="200px" UseStaticHeaders="true"></Scrolling>

 

 

</ClientSettings>

 

 

<MasterTableView AllowNaturalSort="false">

 

 

<NoRecordsTemplate>

 

No Records found

</NoRecordsTemplate>

 

 

<Columns>

 

 

<telerik:GridBoundColumn HeaderText="Changed By" DataField="LoginName" HeaderStyle-Width="130px">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Comment" DataField="Comments" HeaderStyle-Width="200px">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Preview" HeaderStyle-Width="135px"

 

 

DataField="AssetId" >

 

 

<ItemTemplate>

 

 

<a target="_blank" href="API/AssetDeliveryHandler.ashx?assetId=<%# Eval("AssetId") %>" ><%# Eval("FileName") %></a>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn HeaderText="Change Date" DataField="CreateDate" DataType="System.DateTime"

 

 

DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HeaderStyle-Width="125px">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

 

</telerik:RadGrid>

 


Early response is appreciated.
IQworks
Top achievements
Rank 1
 answered on 24 Mar 2009
1 answer
219 views
I am using Q1 2009 and follow the Live Examples of ClientBinding.

Unable get the example to work with error:

System.MissingMethodException was unhandled by user code
  Message="No parameterless constructor defined for this object."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
       at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Web.HttpRuntime.FastCreatePublicInstance(Type type)
       at System.Web.UI.WebControls.LinqDataSourceView.CreateObjectInstance(Type type)
       at System.Web.UI.WebControls.LinqDataSourceView.CreateContext(Type contextType)
       at System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTable(DataSourceOperation operation)
       at System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTableForSelect()
       at System.Web.UI.WebControls.LinqDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
       at System.Web.UI.WebControls.LinqDataSourceView.Select(DataSourceSelectArguments arguments)
       at Telerik.Web.UI.GridLinqDataSource.GetData()
       at Telerik.Web.UI.RadGrid.GetBindingData(String contextTypeName, String tableName, Int32 startRowIndex, Int32 maximumRows, String sortExpression, String filterExpression)
       at DataService.GetDataAndCount(Int32 startRowIndex, Int32 maximumRows, String sortExpression, String filterExpression) in c:\ACAMS\_Schools\App_Code\ GridWcfService.cs:line 43
       at SyncInvokeGetDataAndCount(Object , Object[] , Object[] )
       at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
       at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
  InnerException: 

at the GridWcfService.svc/GridWcfService.cs modules.

Re-install .NET 3.5 SP1 frame work does not fix problem.

How can I fix it?

Thank.
Sebastian
Telerik team
 answered on 24 Mar 2009
3 answers
187 views
I am using the slider control in a repeater with a label on either side of each slider.  I need to do some calculations and update the labels accordingly.  The problem is that I have no way of supplying the clientId's of the labels or passing any variables (that I know of).  I tried adding a onMouseOver event to set variables, but the problem is that it keeps getting called (multiple times) and messing up the actual onClientValueChange function i have written.  Is there any way of supplying additional parameters in these methods?  I am also fine with setting them beforehand using a seperate function if that works but would like to only do it once.
Tsvetie
Telerik team
 answered on 24 Mar 2009
0 answers
124 views
Hi,

I have used this 2 controls and everything was great. The application was a lot faster - the tests performed on the server were really great. I included the controls in my masterpage and in the web.config associated with the website I have registered the controls. I have also used RadCompression.

But, after a while and after no updates were made on the server or localy, I have found out that the application behaves like before the optimisation: really slow and with dozens of separate requests performed by the browser. What could be the cause, expecialy(!) if I didn't modify the code.

Also, given this problem, how can I tell if the RadCompression is executed corectly?
This is what I use: radcontrols for aspnet ajax 2008 Q3, version 2008.3.1314.20

If anyone can tell where I can start looking for this issue, please reply.
Thanks a lot.

Alex
Alexandru
Top achievements
Rank 1
 asked on 24 Mar 2009
1 answer
242 views
I have a RadGrid setup using automatic insert/update with an ObjectContainerDataSource.  In my page's code-behind, I'm handling the data source's OnInserted and OnUpdated events and calling methods in my presenter (MVP pattern). 

The question is this - suppose the presenter detects some business logic violation while it's running OnInserted.  How exactly should this be handled so that the grid can display an error message?  I'd like the grid to remain in edit mode and for the data the user entered to remain on the screen.  I'm using popup edit mode, but I don't think it matters much.  I just want to display an appropriate error message and have the user correct their mistake and resubmit.

The core of my confusion is that I don't see how to get from (1) a presenter throwing an exception via the ObjectContainerDataSource.OnInserted() event handler to (2) a way to handle this exception in a meaningful way in the RadGrid.ItemInserted event handler.  Maybe some code will clarify.

protected void Page_Init(object sender, EventArgs e)
        {
            Grid.ItemInserted += new GridInsertedEventHandler(Grid_ItemInserted);
            UsersDataSource.Inserted += new EventHandler<ObjectContainerDataSourceStatusEventArgs>(UsersDataSource_Inserted);
        }

        void UsersDataSource_Inserted(object sender, ObjectContainerDataSourceStatusEventArgs e)
        {            
            try
            {
                // This might throw a business exception.
                UserPresenter.OnUserInserted((UserDTO)e.Instance);
            }
            catch (Exception ex)
            {
                // If I suppress, the grid will never know about the exception.  If I rethrow, Grid_ItemInserted will never get called.
               // I really want to "bubble" the exception up to Grid_ItemInserted() so it can deal with it in a meaningful way.
            }
        }


        void Grid_ItemInserted(object source, GridInsertedEventArgs e)
        {

            // Handle errors.
            if (e.Exception != null)
            {
                e.ExceptionHandled = true;
                e.KeepInInsertMode = true;
                DisplayMessage("User cannot be created. Reason: " + e.Exception.Message);
            }
            else
            {
                DisplayMessage("User created.");
            }
        }
Georgi Krustev
Telerik team
 answered on 24 Mar 2009
2 answers
182 views
I am building a custom masterpage based upon the blueband.master master page.  I have a radtabpane control for navigation and have added a radsplitter.  Relavent code: 

                            <telerik:RadSplitter Runat=server id="RadSplitter1" Height="100%" Width="100%" Skin="Office2007">  
                                <telerik:RadPane Runat="server" id="RadPane1" Scrolling="None">  
                                <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />  
                                </telerik:RadPane>  
                                <telerik:RadSplitBar Runat="server" id="RadSplitBar1" CollapseMode="Backward" />  
                                <telerik:RadPane Runat="server" id="RadPane2" Width="200px" Scrolling="None" MaxWidth="200" MinWidth="200">  
                                <telerik:RadPanelBar Runat="server" id="RadPanelBar1" Skin="Office2007">  
                                    <Items>  
                                        <telerik:RadPanelItem runat="server" Text="Hot Topics">  
                                            <ItemTemplate>  
                                                <cc1:SiteNews ID="SiteNews1" runat="server" ListName="Hot Topics"/>  
                                            </ItemTemplate>  
                                        </telerik:RadPanelItem>  
                                        <telerik:RadPanelItem runat="server" Text="News and Events">  
                                            <ItemTemplate>  
                                                <cc1:SiteNews2 ID="SiteNews2" runat="server" ListName="Hot Topics"/>  
                                            </ItemTemplate>  
                                        </telerik:RadPanelItem>  
                                    </Items>  
                                </telerik:RadPanelBar>  
                                </telerik:RadPane>  
                            </telerik:RadSplitter>  
 

cc1:SiteNews2 and cc1.SiteNews are custom controls.  It doesn't matter if they are in there or not, it still gives the error.
The page I am having a problem with is empty except for I have added an announcements web part (OOTB).  When I attempt to edit an item and save it I get this error:

Invalid JSON primitive: .

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: Invalid JSON primitive: .

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: Invalid JSON primitive: .]
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject() +873984
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) +434
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +78
   System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +70
   Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +126
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +945
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2071


Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

If I remove the code posted in the first code block the error goes away and I can save the item.

Entire source code for masterpage:

<%@ Master language="C#" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %> 
<%@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %> 
<%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %> 
<%@ Register Tagprefix="PublishingConsole" TagName="Console" src="~/_controltemplates/PublishingConsole.ascx" %> 
<%@ Register TagPrefix="PublishingSiteAction" TagName="SiteActionMenu" src="~/_controltemplates/PublishingActionMenu.ascx" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2009.1.311.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %> 
<%@ Register TagPrefix="cc1" Namespace="ADE_Public_News" Assembly="ADE_Public_News, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30c0b817b583c5c5" %> 
<html dir="<%$Resources:wss, multipages_direction_dir_value %>" runat="server" __expr-val-dir="ltr">  
<head runat="server">  
    <meta name="GENERATOR" content="Microsoft SharePoint">  
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
    <meta http-equiv="Expires" content="0">  
    <SharePoint:RobotsMetaTag runat="server"/>  
    <title id="onetidTitle">  
        <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/>  
    </title> 
    <Sharepoint:CssLink runat="server"/>  
    <!--Styles used for positioning, font and spacing definitions--> 
    <SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/~language/Core Styles/Band.css%>" runat="server"/>  
    <SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/controls.css %>" runat="server"/>  
    <SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/zz1_blue.css%>" runat="server"/>  
    <SharePoint:ScriptLink name="init.js" runat="server"/>  
    <!--Placeholder for additional overrides--> 
    <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>  
</head> 
<body class="body" onload="javascript:_spBodyOnLoadWrapper(); SetSearchBoxLoc();" > 
    <form runat="server" onsubmit="return _spFormOnSubmitWrapper();">  
    <input id="ctl00_RadPanelBar1_ClientState" name="ctl00_RadPanelBar1_ClientState" type="hidden" /> 
    <input id="ctl00_RadSplitBar1_ClientState" name="ctl00_RadSplitBar1_ClientState" type="hidden" /> 
    <script language="javascript" type="text/javascript">  
        window.onresizeSetSearchBoxLoc;  
          
        function getY( oElement )  
        {  
            //alert('in getY');  
            var iReturnValue = 0;  
            while( oElement != null )   
            {  
                iReturnValue += oElement.offsetTop;  
                oElementoElement = oElement.offsetParent;  
            }  
            return iReturnValue;  
        }  
        function getX(obj)  
        {  
            var curleft = 0;  
            if(obj.offsetParent)  
                while(1)   
                {  
                  curleft += obj.offsetLeft;  
                  if(!obj.offsetParent)  
                    break;  
                  objobj = obj.offsetParent;  
                }  
            else if(obj.x)  
                curleft += obj.x;  
            return curleft;  
        }  
 
        function getElementHeight(Elem)   
        {  
            var xPos = Elem.offsetHeight;  
            return xPos;  
        }  
          
        function getElementWidth(Elem)   
        {  
            var xPos = Elem.offsetWidth;  
            return xPos;  
      
        }  
        function SetSearchBoxLoc()  
        {  
            var contY = 0;  
            var contX = 0;  
            var contWidth = 0;  
            var cont = document.getElementById('navmenu');  
            var searchElem = document.getElementById('searchHolder');  
            //alert('elem');  
            contX = getX(cont);  
            contY = getY(cont);  
              
              
            contWidth = getElementWidth(cont);  
            //alert('width: ' + contWidth);  
            var xPos = contX + contWidth - 180;  
              
            searchElem.style.position="absolute";  
            searchElem.style.top=contY + 'px';  
            searchElem.style.left=xPos + 'px';  
                          
            //alert('x: ' + contX);  
            //alert('y: ' + contY);  
        }  
          
    </script> 
    <WebPartPages:SPWebPartManager runat="server"/>  
    <asp:ScriptManager runat="server" ID="ScriptManager1" /> 
    <table cellpadding="0" cellspacing="0" class="master">  
        <tr> 
            <td height="100%" class="shadowLeft">  
                <div class="spacer">  
                </div> 
            </td> 
            <td valign="top">  
                <table cellpadding="0" cellspacing="0" width="100%" class="masterContent">  
                                <tr style="height:0px"><td> 
                                    <wssuc:DesignModeConsole id="IdDesignModeConsole" runat="server"/></td></tr>  
                <tr> 
                    <td colspan="2" class="authoringRegion">  
                             <span class="siteActionMenu">  
                                <PublishingSiteAction:SiteActionMenu runat="server"/>  
                            </span> 
                        <div class="sharepointLogin">  
                        <!--Authentication for Authors only--> 
                            <table cellpadding="0" cellspacing="0" > 
                                <tr> 
                                    <td class="ms-globallinks">  
                                    <SharePoint:DelegateControl ControlId="GlobalSiteLink1" Scope="Farm" runat="server"/></td> 
                                    <td class="ms-globallinks">  
                                    <SharePoint:DelegateControl ControlId="GlobalSiteLink2" Scope="Farm" runat="server"/></td> 
                                    <td class="ms-globallinks">  
                                    <wssuc:Welcome id="explitLogout" runat="server"/></td> 
                                </tr> 
                            </table> 
                        </div> 
                        <div class="console">  
                            <PublishingConsole:Console runat="server"/>  
                        </div> 
                    </td> 
                </tr> 
                <tr> 
                    <td colspan="2" > 
                        <table cellpadding="0" cellspacing="0" width="100%">  
                            <tr> 
                                <td colspan="4">  
                                    <table cellpadding="0" cellspacing="0" width="100%">  
                                        <tr> 
                                            <td class="topAreaLeft"/>  
                                            <td colspan="2" class="topAreaMid"/>  
                                            <td class="topAreaRight">  
                                              
                                                <div class="topLinkBar">  
                                                    <div class="topLink">  
                                                    <PublishingVariations:VariationsLabelMenu id="labelmenu1" runat="server"/></div> 
                                                </div> 
                                            </td> 
                                        </tr> 
 
                                    </table> 
                                </td> 
                            <tr class="topNavContainer">  
                                <td class="topNavRoundLeft">  
                                    <div class="glassSpacerLeft" /> 
                                </td> 
                                <td valign="top" style="width:100%" id="navmenu" colspan="2">  
                                    <telerik:RadTabStrip runat="server" ID="RadTabStrip1" DataSourceID="siteMapDataSource1" Skin="Office2007" OnClientLoad="SetSearchBoxLoc"/>  
                                    <PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server" 
                                                SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true" 
                                                StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false" 
                                                TreatStartingNodeAsCurrent="false" TrimNonCurrentTypes="Heading"/>  
                                </td> 
                                <td class="topNavRoundRight" > 
                                    <div class="glassSpacerRight" /> 
                                </td> 
                            </tr> 
                        </table> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="2">  
                    <table  cellpadding="0" cellspacing="0" width="100%">  
                        <tr> 
                            <td width="100%">  
                                <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">  
                                    <div class="breadcrumb">  
                                        <asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode" 
                                            RenderCurrentNodeAsLink="false" CurrentNodeStyle-CssClass="breadcrumbCurrent" NodeStyle-CssClass="ms-sitemapdirectional"/>  
                                    </div> 
                                </asp:ContentPlaceHolder> 
                            </td> 
                            <td> 
                                <asp:ContentPlaceHolder ID="PlaceHolderMiniConsole" runat="server" /> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
            <tr> 
                <td valign="top">  
                    <asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat ="server" /> 
                    <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarTop" runat="server" Visible="false" /> 
                    <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server" Visible="false">  
                    </asp:ContentPlaceHolder> 
                    <asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat ="server" /> 
                    <asp:ContentPlaceHolder id="PlaceHolderNavSpacer" runat="server" Visible="false">  
                        <div class="leftNavSpacer"/>  
                    </asp:ContentPlaceHolder> 
                </td> 
                <td width="100%" valign="top">  
                    <div class="mainContainer" id="MSO_ContentDiv" runat="server">  
                        <div class="pageTitle">  
                            <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" /> 
                        </div> 
                        <div class="mainContent">  
                            <telerik:RadSplitter Runat=server id="RadSplitter1" Height="100%" Width="100%" Skin="Office2007">  
                                <telerik:RadPane Runat="server" id="RadPane1" Scrolling="None">  
                                <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" /> 
                                </telerik:RadPane> 
                                <telerik:RadSplitBar Runat="server" id="RadSplitBar1" CollapseMode="Backward" /> 
                                <telerik:RadPane Runat="server" id="RadPane2" Width="200px" Scrolling="None" MaxWidth="200" MinWidth="200">  
                                <telerik:RadPanelBar Runat="server" id="RadPanelBar1" Skin="Office2007">  
                                    <Items> 
                                        <telerik:RadPanelItem runat="server" Text="Hot Topics">  
                                            <ItemTemplate> 
                                                <cc1:SiteNews ID="SiteNews1" runat="server" ListName="Hot Topics"/>  
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem runat="server" Text="News and Events">  
                                            <ItemTemplate> 
                                                <cc1:SiteNews2 ID="SiteNews2" runat="server" ListName="Hot Topics"/>  
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                </telerik:RadPanelBar> 
                                </telerik:RadPane> 
                            </telerik:RadSplitter> 
                              
                        </div> 
                    </div> 
                </td> 
            </tr> 
        </table> 
        </td> 
        <td height="100%" class="shadowRight">  
            <div class="spacer">  
            </div> 
        </td> 
        </tr> 
        </table> 
        <asp:panel visible="false" runat="server">  
            <asp:ContentPlaceHolder ID="PlaceHolderPageImage" runat="server" /> 
            <asp:ContentPlaceHolder ID="PlaceHolderBodyLeftBorder" runat="server" /> 
            <asp:ContentPlaceHolder ID="PlaceHolderTitleLeftBorder" runat="server" /> 
            <asp:ContentPlaceHolder ID="PlaceHolderTitleAreaSeparator" runat="server" /> 
            <asp:ContentPlaceHolder ID="OSSConsole" runat="server" /> 
            <asp:ContentPlaceHolder ID="PlaceHolderTitleRightMargin" runat="server" /> 
            <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat ="server" /> 
            <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat ="server" /> 
            <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat ="server" /> 
            <asp:ContentPlaceHolder id="PlaceHolderBodyRightMargin" runat="server" /> 
        </asp:panel> 
        <div class="search" id="searchHolder">  
            <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">  
                <SPSWC:SearchBoxEx id="SearchBox" RegisterStyles="false" TextBeforeDropDown="" TextBeforeTextBox="<%$Resources:cms,masterpages_searchbox_label%>" TextBoxWidth="100" GoImageUrl="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow.jpg %>" 
                    GoImageUrlRTL="<% $SPUrl:~sitecollection/Style Library/Images/Search_Arrow_RTL.jpg %>" UseSiteDefaults="true" DropDownMode = "HideScopeDD" SuppressWebPartChrome="true" runat="server" WebPart="true" __WebPartId="{724C5110-9CDA-4612-94B6-E6317505264C}"/>  
            </asp:ContentPlaceHolder> 
        </div> 
          
          
          
          
          
          
          
      
          
          
          
          
          
          
          
    </form> 
 </body> 
</html> 
 

Any idea why I am getting this error?
Stanimir
Telerik team
 answered on 24 Mar 2009
5 answers
249 views
After entering the text (for instance one word of 5 characters long) in a radeditor, the text is saved to the database.
However the text that is inserted into the database contains 5 characters + two extra characters.
If the inserted text is shown in a radgrid i get a javascript error because of the 2 extra characters that were saved to the database ( i guess something like cr/lf).
How can I prevent that radeditor stores these extra characters ?

Kind regards,
N.
Tervel
Telerik team
 answered on 24 Mar 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?