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

Databinding the RadEditor control

1 Answer 230 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Shane Clay
Top achievements
Rank 1
Shane Clay asked on 12 Oct 2010, 06:50 AM
Hi Guys,

I'm playing around with the RadEditor for the first time. I want to databing the content to my datasource but can't seem to work out how.

My datasource;

 

<asp:SqlDataSource ID="sdsJobDetails_viewJobs" runat="server" 
    ConnectionString="<%$ ConnectionStrings:Gateway10.My.MySettings.dbConnString %>" 
    SelectCommand="SELECT * FROM [viewJob] WHERE ([jobID] = @jobID)" 
    ProviderName="<%$ ConnectionStrings:Gateway10.My.MySettings.dbConnString.ProviderName %>">
    <SelectParameters>
        <asp:QueryStringParameter DefaultValue="0" Name="jobID" 
            QueryStringField="jobID" Type="Int64" />
    </SelectParameters>
</asp:SqlDataSource>


This doesn't work;

<telerik:RadEditor ID="RadEditor1" runat="server" Height="300px" Width="100%" DataSourceID="sdsJobDetails_viewJobs" 
    EditModes="Design" EnableResize="False" Content='<%#Bind("jobTextNotes")%>'>

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Oct 2010, 03:44 PM
Hi Shane,

Please, see the following live demo: Datagrid Edit Template, which demonstrates how to databind RadEditor. You can use either

<telerik:radeditor
       Id="Editor" 
       Runat="server" 
       Content='<%# DataBinder.Eval(Container.DataItem, "NewsText") %>'
 ></telerik:radeditor>


or

<telerik:radeditor
       Id="Editor" 
       Runat="server" 
       Content='<%# Bind(Container.DataItem, "NewsText") %>'
 ></telerik:radeditor>


Best wishes,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Shane Clay
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or