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

Update Data with FormView and LinqData

1 Answer 80 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Bruno asked on 02 Mar 2009, 06:13 AM
I try to update data in a FormView, thats connected to a LinqDataSource. If I click on the Submit button, the page reloades, but the Data isen't updating. I cant find anything wrong with the code. Any help would be appreciated.


Here the code:
        <asp:Panel ID="ContentHeaderPanel" runat="server" CssClass="Boxheader"
            <asp:DropDownList ID="ContentDropDownList" runat="server"  
                DataSourceID="ContentLinqDataSource" DataTextField="Content_Name"  
                DataValueField="Content_ID" AutoPostBack="True"
            <asp:LinqDataSource ID="ContentLinqDataSource" runat="server"  
                ContextTypeName="gourmetnavigatorDataContext" OrderBy="Content_Name"  
        <asp:Panel ID="ContentPanel" runat="server" CssClass="Boxcontent"
            <asp:FormView ID="ContentFormView" runat="server" DefaultMode="Edit"  
                DataSourceID="ContentdetailLinqDataSource" DataKeyNames="Contentdetail_ID"
                    <telerik:RadEditor ID="Contentdetail_Text" runat="server" Language="de-DE" 
                        Skin="Telerik" Content='<%# DataBinder.Eval(Container.DataItem, "Contentdetail_Text") %>'
                                <telerik:EditorTool Name="Paste" /> 

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 05 Mar 2009, 11:25 AM
Hello Bruno,

The case could be that the editor's original value overwrites the one submitted from the browser. This happens, for example, if you did not put the initial value setting in a if block checking whether the page is postback. Here is what you should do in your Page_Load method:

  If Not Page.IsPostBack Then
                ' Set the editor content from database here
  End If

If this is not the reason for the problem, we ask you to send us a sample project including your aspx page with its codebehind. We will review your code and provide a solution.

You can also see the code of the following example:

Best wishes,
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question