Last post Mar 04, 2011 04:38 AM by uid895650
Feb 28, 2011 10:21 PM|bravo659|LINK
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"
TableName="Names" EnableUpdate="True" EnableDelete="True">
That will allow the update and delete to the database.
Can anyone assist thanks.
Mar 01, 2011 05:16 AM|uid895650|LINK
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.
Mar 04, 2011 01:05 AM|bravo659|LINK
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.
Mar 04, 2011 04:38 AM|uid895650|LINK
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