ASP.NET GridView throwing error: "Update is disabled for this control".

Posted by NTDLS on Stack Overflow See other posts from Stack Overflow or by NTDLS
Published on 2011-01-10T23:32:01Z Indexed on 2011/01/10 23:53 UTC
Read the original article Hit count: 178

Filed under:
|
|
|

I have the absolutely most simple setup imaginable. A single table defined in an Entity model in ASP.net v4, the model is bound directly to a GridView with AutoGenerateEditButton enabled.

However, each time I hit edit, then save, the page throws the error “Update is disabled for this control" for which I cannot find a solution.

What is causing this error? What can do to resolve it?

<%
<asp:GridView ID="MenuItemsGrid" runat="server"
    DataSourceID="gridDataSource"
    AutoGenerateEditButton="true"
    AutoGenerateColumns="true">  
</asp:GridView>  

<asp:EntityDataSource ID="gridDataSource" runat="server"
    ConnectionString="name=dataEntitiesModel"
    DefaultContainerName="dataEntities"
    EntitySetName="MenuItems" />
%>

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET