I'm getting the following exception on a random basis.
My grid is bound to a datatable stored in the session.I don't think it's related to session timeout...but I might be wrong...
How can I resolve the issue?
ID is neither a DataColumn nor a DataRelation for table .
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ArgumentException: ID is neither a DataColumn nor a DataRelation for table .
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
Stack Trace:
[ArgumentException: ID is neither a DataColumn nor a DataRelation for table .] System.Data.DataRowView.get_Item(String property) +1741034 Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +313 [GridException: There was a problem extracting DataKeyValues from the DataSource. Please ensure that DataKeyNames are specified correctly and all fields specified exist in the DataSource.] Telerik.Web.UI.GridTableView.PopulateDataKeys(Object dataItem) +1188 Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +524 Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +187 Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1573 Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +768 System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57 System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142 Telerik.Web.UI.GridTableView.PerformSelect() +38 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73 Telerik.Web.UI.GridTableView.DataBind() +354 Telerik.Web.UI.RadGrid.DataBind() +165 Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +3869 Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +177 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 |