WebGrid binding issue : Error:: There is no row at position 1.

7 replies. Last post: April 16, 2010 5:56 AM by Glenn Layaar
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Nitin KohadMember

Hi,

I am binding WebGrid using ObjectDataSource and sometimes found that application crashes with the unhandled error as below :

<Exception><Type>System.Web.HttpUnhandledException</Type><Message>Exception of type 'System.Web.HttpUnhandledException' was thrown.</Message><Source>System.Web</Source><StackTrace> 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.atlashome_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)</StackTrace><TargetSite>Boolean HandleError(System.Exception)</TargetSite></Exception><Exception><MethodName>Application_Error</MethodName><Type>System.IndexOutOfRangeException</Type><Message>There is no row at position 1.</Message><Source>System.Data</Source><StackTrace> at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) at System.Data.RBTree`1.get_Item(Int32 index) at System.Data.Index.InitRecords(IFilter filter) at System.Data.Index..ctor(DataTable table, Int32[] ndexDesc, IndexField[] indexFields, DataViewRowState recordStates, IFilter rowFilter) at System.Data.DataTable.GetIndex(IndexField[] indexDesc, DataViewRowState recordStates, IFilter rowFilter) at System.Data.DataView.UpdateIndex(Boolean force, Boolean fireEvent) at System.Data.DataView.UpdateIndex(Boolean force) at System.Data.DataView.SetIndex2(String newSort, DataViewRowState newRowStates, DataExpression newRowFilter, Boolean fireEvent) at System.Data.DataView..ctor(DataTable table) at System.Web.UI.WebControls.FilteredDataSetHelper.CreateFilteredDataView(DataTable table, String sortExpression, String filterExpression, IDictionary filterParameters) at System.Web.UI.WebControls.ObjectDataSourceView.CreateFilteredDataView(DataTable dataTable, String sortExpression, String filterExpression) at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at ISNet.WebUI.DataSourceInfo.PerformSelect() at ISNet.WebUI.WebGrid.WebGridDataSourceInfo.PerformSelect() at ISNet.WebUI.DataSourceInfo.DataBind() at ISNet.WebUI.DataSourceInfo.EnsureDataBound() at ISNet.WebUI.DataSourceInfo.set_RequiresDataBinding(Boolean value) at ISNet.WebUI.WebGrid.WebGrid._?(Boolean ?) at ISNet.WebUI.WebGrid.WebGrid.OnInitializeDataSource(Object dataSource) at ISNet.WebUI.WebGrid.WebGrid.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</StackTrace><TargetSite>Int32 GetNodeByIndex(Int32)</TargetSite></Exception>
All times are GMT -5. The time now is 7:38 PM.
Previous Next