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

Binding content in RadEditor

6 Answers 731 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Joselito
Top achievements
Rank 1
Joselito asked on 04 Jul 2008, 02:53 PM
How to bind content in radeditor inside the gridview?
Im using the code below but it doesnt work.

<telerik:RadEditor ID="radEditorID run="server" EditModes="Design" Skin="WebBlue" ToolsFile="Telerik/EditorToolsFile.xml"  Height="80px" Width="450px" >                                           
                        <Content>'<%# Bind("Customer_Name") %>'</Content>
</telerik:RadEditor>       

This is the error that is throwing.
A call to Bind must be assigned to a property of a control inside a template.   at System.Web.UI.ControlBuilder.AppendSubBuilder(ControlBuilder subBuilder)
   at System.Web.UI.TemplateParser.AppendSubBuilder(ControlBuilder builder, ControlBuilder subBuilder)
   at System.Web.UI.TemplateParser.ProcessCodeBlock(Match match, CodeBlockType blockType, String text)
   at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
   at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)



I found some posting in the forum but I think this is the old radeditor for the prometheus theres no content property inline.

<telerik:RadEditor ID="RadEditor1" Content=' <%# Bind("ShortDescription") %>'  runat="server"></telerik:RadEditor>

http://www.telerik.com/community/forums/thread/b311D-bdeceh.aspx


6 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Jul 2008, 03:13 PM
Hi Joselito,

RadEditor for ASP.NET AJAX offers an inline Content property

and you can set it manually like this:

<telerik:RadEditor ID="RadEditor1" Content="sample content"  runat="server"></telerik:RadEditor>

or as a inner-tag:

<telerik:RadEditor ID="RadEditor1" runat="server">
    <Content>
        sample content
    </Content>

</telerik:RadEditor>

In your case however you should bind the editor using the inline property, e.g.

<telerik:RadEditor ID="RadEditor1" Content=' <%# Bind("
Customer_Name") %>'  runat="server"></telerik:RadEditor>

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Developer
Top achievements
Rank 1
answered on 08 Dec 2009, 07:14 PM
I have the same problem, however there is no inline content property in my radEditor

 <telerik:GridTemplateColumn UniqueName="Content">  
                            <EditItemTemplate> 
                                <telerik:RadEditor   
                                    ID="RadEditor1" 
                                    runat="server"   
                                    Skin="Hay">  
                                      
                                    <Content> 
                                        <%#DataBinder.Eval(Container.DataItem, "Type").ToString.Trim%> 
                                    </Content> 
                                </telerik:RadEditor> 
                            </EditItemTemplate> 
</telerik:GridTemplateColumn> 

There is ContentFilters and ContentAreaCssFile but not just "Content"

 

0
Developer
Top achievements
Rank 1
answered on 08 Dec 2009, 07:42 PM
nevermind, I see it was answered in the linked forum now....

The inline "Content" tag isn't covered by intellisense but does work...
0
Jayesh Goyani
Top achievements
Rank 2
answered on 20 Nov 2010, 07:33 AM
I have the same problem

any one have idea how can i solve this issue.
0
Rumen
Telerik team
answered on 24 Nov 2010, 02:19 PM
Hi Jayesh,

You can see how to get and load content in RadEditor through the Content property in the following live demos:

Save In External File
Save in Database
EditItemTemplate


Use their code as a base to implement your scenario.


Best wishes,
Rumen
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 06 Dec 2010, 07:57 AM
thanx for your help.
Tags
Editor
Asked by
Joselito
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Developer
Top achievements
Rank 1
Jayesh Goyani
Top achievements
Rank 2
Share this question
or