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

Binding RadEditor in a FormTemplate

1 Answer 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 17 Nov 2008, 08:23 PM
I am having some difficulty binding data to a RadEditor inside a FormTemplate.  The KB article suggested to use content="<% Bind("markup") %>" but nothing shows up in the editor and VS says that attribute does not exist.  Here is what I have in my code:

<FormTemplate> 
                        <table cellpadding="5" cellspacing="0"
                            <tr> 
                                <td>Active:</td> 
                                <td colspan="3"><asp:CheckBox runat="server" ID="rbActive" /></td
                            </tr> 
                            <tr> 
                                <td>Title:</td> 
                                <td colspan="3"><asp:TextBox runat="server" Style="width: 205px; margin-left: 3px;" ID="txbTitle" Text='<%# Bind("title") %>' /> 
                            <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" ControlToValidate="txbTitle" 
                                ErrorMessage="Please enter a title." Display="Dynamic" SetFocusOnError="true"
                            </asp:RequiredFieldValidator></td
                            </tr> 
                            <tr> 
                                <td>Document Date:</td> 
                                <td><telerik:RadDateTimePicker AutoPostBackControl="Both" ID="docdate" runat="server" Skin="Hay"
                            </telerik:RadDateTimePicker></td
                                <td>Viewable Date:</td> 
                                    <td><telerik:RadDateTimePicker AutoPostBackControl="Both" ID="viewabledate" runat="server" Skin="Hay" DbSelectedDate='<%# Bind("viewabledate", "{0:d}") %>' MinDate="01-01-1900"
                                </telerik:RadDateTimePicker></td
                            </tr> 
                            <tr> 
                                <td>Expiry Date:</td> 
                                <td colspan="3"><telerik:RadDateTimePicker AutoPostBackControl="Both" ID="expirydate" runat="server" Skin="Hay" DbSelectedDate='<%# Bind("expirydate", "{0:d}") %>' MinDate="01-01-1900"
                            </telerik:RadDateTimePicker></td
                            </tr> 
                            <tr><td colspan="4">&nbsp;</td></tr
                            <tr> 
                                <td>Link:</td> 
                                <td><asp:TextBox runat="server" Style="width: 205px; margin-left: 3px;" ID="txblink" Text='<%# Bind("link") %>' /></td
                                <td>New Window:</td> 
                                <td>Yes 
                                <asp:RadioButton runat="server" GroupName="targetgroup" ID="rbtarget1" /> No<asp:RadioButton runat="server" GroupName="targetgroup" ID="RadioButton2" /></td
                            </tr> 
                            <tr>                             
                                <td colspan="4"
                                    <telerik:RadEditor ID="RadEditor1" runat="server" Skin="Hay" Content='<% Bind("markup") %>'
                                    </telerik:RadEditor> 
                                </td> 
                            </tr> 
                        </table> 
                    </FormTemplate> 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 18 Nov 2008, 07:16 PM
Hello Derek,

I believe you should change <% Bind("markup") %> to something similar to <% Bind("viewabledate") %>.

Let me know if I missed something.

Greetings,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Derek
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or