WebTextEditor could be used as an item template in DetailsView control.
In this topic, you will learn how to use WebTextEditor as Item Template.
To use WebTextEditor as Item Template in DetailsView
- Create a DetailsView with employee data bound from the Northwind.mdb.
- Set the Notes field to ItemTemplate and change
to edit template view mode.
- Drag WebTextEditor control from the Toolbox to the ItemTemplate and
InsertItemTemplate of DetailsView.
- Set the EnableHTMLView property to false and
EnableSplitView property to false under ViewSettings
for both WebTextEditor in order to have a simpler look.
- Set the content property in WebTextEditor to bind the DetailsView field in the source
view. Here is the snippet:
<ISWebTextEditor:WebTextEditor ID="WebTextEditor1" runat="server" Height="200px" Width="500px" Content='<%# Bind("Notes") %>'
.
.
.
</ISWebTextEditor:WebTextEditor>