Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embed freetextbox in a Gridview

Status
Not open for further replies.

ICTECH

Technical User
Jun 5, 2002
131
CA
I'm trying to embed freetextbox control in a Gidview. The purpose is to read the html data from a database and display it formatted the way the editor entered it. I can embed the control into the grid using the following:

Code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="NoticeID"
EmptyDataText="There are no data records to display.">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:TemplateField HeaderText="Motion" SortExpression="Motion">
<EditItemTemplate>
<FTB:FreeTextBox ID="FreeTextBox" runat="server" Text='<%# Bind("text") %>' RenderMode="Rich" EnableToolbars="True" Height="150px"></FTB:FreeTextBox>
</EditItemTemplate>
<ItemTemplate>
<FTB:FreeTextBox ID="FreeTextBox" runat="server" Text='<%# Bind("text") %>' AutoGenerateToolbarsFromString="False" EnableHtmlMode="False" EnableToolbars="False" Height="150px" RenderMode="Rich"></FTB:FreeTextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

The problem I'm having is decoding (server.htmldecode) the stored data and placing it back in freetextbox. Any help would be great.. I've been searching and not finding much. Thanks...
 
Thanks for the reply jbenson..

It hit me.. I had to process the data from the database through one dataset through to another decoding the data. So when its was passed to the gridview with freetextbox, it would then present properly. Works great.
 
Glad you got it! Just so you know in the future, if you are dealing with 3rd party controls, it is best to contact their support as it is really not a .NET issue.
 
I wasn't sure if it was the 3rd party control or the way I had to handle to information. It turned out to be how the information had to be handles before it was passed to the control. I was hoping that someone else mayhave tried to embed the control in a gridview and could shed some light.. Thanks again..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top