Hello,
I try to use the fckeditor inside a datalist on an edit command :
The Html code :
When I click on my edit button, the FCKEditor is displayed and the text is put inside.
here is the code for the update event :
Everything is working fine except that the text in the FCKEditor value never change, if I update the value in my datalist and try to update it, it always keep the old value.
I am not using ajax or something else like this.
Any Idea ?
Thanks,
Cédric
I try to use the fckeditor inside a datalist on an edit command :
The Html code :
<asp:DataList ID="DataList1" runat="server" DataSourceID="LinqDataSource1" OnDeleteCommand="DataList1_DeleteCommand"
OnEditCommand="DataList1_EditCommand" OnCancelCommand="DataList1_CancelCommand"
OnUpdateCommand="DataList1_UpdateCommand" DataKeyField="TeamMemberId">
<HeaderTemplate>
<div>
</HeaderTemplate>
<ItemTemplate>
<!-- HTML CODE -->
</ItemTemplate>
<EditItemTemplate>
<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="../fckeditor/" FormatOutput="true" EnableViewState="true" ToolbarSet="Basic" Width="300px" Height="200px" Value='<%# Eval("Description") %>'>
</FCKeditorV2:FCKeditor>
</EditItemTemplate>
<FooterTemplate>
</div>
</FooterTemplate>
</asp:DataList>
When I click on my edit button, the FCKEditor is displayed and the text is put inside.
here is the code for the update event :
protected void DataList1_UpdateCommand(object source, DataListCommandEventArgs e)
{
int id = (int)this.DataList1.DataKeys[e.Item.ItemIndex];
string s = ((FCKeditor)e.Item.FindControl("FCKeditor1")).Value;
}
Everything is working fine except that the text in the FCKEditor value never change, if I update the value in my datalist and try to update it, it always keep the old value.
I am not using ajax or something else like this.
Any Idea ?
Thanks,
Cédric
