Hi all
I'm been looking around for an answer to this but looks like i can't find any
I'm using Infragistics 17.1 WebDataGrid i added dynamically checkbox column and paging function
as you can see in the attached code
The problem is that when click the Paging button after changing the checkbox value, the following error occurs:
Thanks in advance for any help.
code
BoundCheckBoxField CKfield = new BoundCheckBoxField();CKfield.Key = ColumnName;CKfield.Header.Text = HeaderCaption;CKfield.DataFieldName = ColumnName;CKfield.Width = Width;#region Column HeaderAlignif (HeaderAlign == HorizontalAlign.Center){CKfield.Header.CssClass = "HCAlign";}if (HeaderAlign == HorizontalAlign.Justify){CKfield.Header.CssClass = "HJAlign";}if (HeaderAlign == HorizontalAlign.Left){CKfield.Header.CssClass = "HLAlign";}if (HeaderAlign == HorizontalAlign.NotSet){CKfield.Header.CssClass = "HLAlign";}if (HeaderAlign == HorizontalAlign.Right){CKfield.Header.CssClass = "HRAlign";}#endregion
#region Column ContentAlignif (ColumnAlign == HorizontalAlign.Center){CKfield.CssClass = "CAlign";}if (ColumnAlign == HorizontalAlign.Justify){CKfield.CssClass = "JAlign";}if (ColumnAlign == HorizontalAlign.Left){CKfield.CssClass = "LAlign";}if (ColumnAlign == HorizontalAlign.NotSet){CKfield.CssClass = "LAlign";}if (ColumnAlign == HorizontalAlign.Right){CKfield.CssClass = "rAlign";}#endregion
if (Hidden)CKfield.Hidden = true;elseCKfield.Hidden = false;
EditingColumnSetting set = new EditingColumnSetting();set.ColumnKey = ColumnName;if (CheckUpdate == AllowUpdate.Yes){set.ReadOnly = false;}else{set.ReadOnly = true;}base.Behaviors.CreateBehavior<EditingCore>();base.Behaviors.EditingCore.Behaviors.CreateBehavior<CellEditing>();base.Behaviors.EditingCore.Behaviors.CellEditing.ColumnSettings.Add(set);
base.Columns.Add(CKfield);
error :
[NotSupportedException]: A row can only be updated or deleted if the DataKeyFields property is set. 위치: Infragistics.Web.UI.GridControls.EditingCore.OnAction(String actionType, Object id, Object value, Object tag) 위치: Infragistics.Web.UI.GridControls.GridBehavior.Infragistics.Web.UI.GridControls.IGridBehavior.OnAction(String actionType, Object id, Object value, Object tag) 위치: Infragistics.Web.UI.GridControls.GridBot.LoadAdditionalClientState(Object state) 위치: Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent() 위치: Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent() 위치: Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.RaisePostDataChangedEvent() 위치: System.Web.UI.Page.RaiseChangedEvents() 위치: System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: 'System.Web.HttpUnhandledException' 형식의 예외가 Throw되었습니다. 위치: System.Web.UI.Page.HandleError(Exception e) 위치: System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 위치: System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 위치: System.Web.UI.Page.ProcessRequest() 위치: System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 위치: System.Web.UI.Page.ProcessRequest(HttpContext context) 위치: ASP.default2_aspx.ProcessRequest(HttpContext context) 파일 c:\Users\YoonPC\AppData\Local\Temp\Temporary ASP.NET Files\vs\0872ed3f\1efd606c\App_Web_edxwoipc.0.cs:줄 0 위치: System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 위치: System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Hello,
Thank you for contacting us!
I wanted to ask, do you have set a correct DataKeyFields? Most of these exceptions occur because the DataKeyFields that are specified are not set properly. It would be highly appreciated if you share a working sample with the issue or share more code (Grid markup) in order to try to isolate the sample on my side.
Have a look at the forum threads below:
https://es.infragistics.com/community/forums/t/70232.aspx
https://infragistics.com/community/forums/t/93081.aspx
https://es.infragistics.com/community/forums/t/67461.aspx
Looking forward to haring from you.