Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
Table doesn't have a primary key after updated data
posted

hi,

I'm getting error "[MissingPrimaryKeyException]: Table doesn't have a primary key." after updated a cell in webdatagrid.

For your information the data has been updated into database and after re-populate the grid i'm getting "[MissingPrimaryKeyException]: Table doesn't have a primary key.".

Below are the error details:

Async request failed
 
[MissingPrimaryKeyException]: Table doesn't have a primary key.
   at Infragistics.Web.UI.Framework.Data.DataViewDataSourceAdapter.Update(Object dataItem, IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
   at Infragistics.Web.UI.Framework.Data.DataSourceObjectView.Update(Object dataItem, IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
   at Infragistics.Web.UI.GridControls.EditingCore.OnAction(String actionType, Object id, Object value, Object tag)
   at Infragistics.Web.UI.GridControls.GridBehavior.Infragistics.Web.UI.GridControls.IGridBehavior.OnAction(String actionType, Object id, Object value, Object tag)
   at Infragistics.Web.UI.GridControls.GridBot.LoadAdditionalClientState(Object state)
   at Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent()
   at Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent()
   at Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.RaisePostDataChangedEvent()
   at System.Web.UI.Page.RaiseChangedEvents()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.search_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ded915f3\b40162ce\App_Web_search.…

 

What shuold i set in order to resolve this error?