locked
Edit mode will not update RRS feed

  • Question

  • User206210744 posted

    I have a problem with LinqDataSource will not update modification to data in the textboxes of the GridView. I have the update enabled to true. I will not render an error but will not update data to database.

    I also created the TemplateField to the names table to textboxes. For every field i Converted to TemplateField.

     <asp:LinqDataSource ID="LinqDataSource1" runat="server"
                ContextTypeName="TestDBDataContext" OrderBy="FirstName"
              TableName="Names" EnableUpdate="True" EnableDelete="True">
            </asp:LinqDataSource>

    That will allow the update and delete to the database.

    Can anyone assist thanks.

    Monday, February 28, 2011 10:21 PM

All replies

  • User1100692814 posted

    Hi

    Does it fire the updating and updated events when you submit your data back?

    It all looks ok to me. I presume this is linked against a DataView or GridView etc...Check typos?

    Does it display data OK? Check the namespace created in the datacontext is a match as well - I found that some times I have to use: MyBLL.MyDataContext (weird, I know).

    Hope this helps.

    David

    Tuesday, March 1, 2011 5:16 AM
  • User206210744 posted

    I didn't get an email notification for this reply sorry for my late reply.

    I set the edit automatic when i edit it will not update.

    when i select a row it displays data ok and the edit button goes to edit mode and when changes are made click update will not update the cells i modified.

    I said the same thing, it looks good but will not update and have no idea why is doing this.

    All namespace are correct, the spelling are correct as well.

     

     

    Friday, March 4, 2011 1:05 AM
  • User1100692814 posted

    Hi

    I presume you have the DataKeys property set in the GridView to the Primary Key of the record you are trying to update?

    Could you maybe post a simplified version of your GridView code to see? Thanks

    David

    Friday, March 4, 2011 4:38 AM