Exception type: IndexOutOfRangeException

3 posts, 0 answers
  1. Viswajit
    Viswajit avatar
    1 posts
    Member since:
    Feb 2012

    Posted 15 Apr 2014 Link to this post

    I am getting the following error on a form grid:

    Exception type: IndexOutOfRangeException
    Exception message: Cannot find table 0.
       at System.Data.DataTableCollection.get_Item(Int32 index)
       at storagePortal.shipout.RadGrid1_NeedDataSource(Object source, GridNeedDataSourceEventArgs e)
       at Telerik.Web.UI.RadGrid.OnNeedDataSource(GridNeedDataSourceEventArgs e)
       at Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason)
       at Telerik.Web.UI.RadGrid.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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    The web page was working fine yesterday.  Nothing changed that I know of, but this error is appearing today. The data source is provided by a stored procedure that I ran separately - it works fine.  Anyone have any ideas? 


  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 16 Apr 2014 in reply to Viswajit Link to this post

    Hello,

    As per your error message, Your stored procedure didn't return any result.
    I think you assign Table[0] in radgrid datasource and it is not able to find the Table1 because result is null.

    So, can you please check the stored procedure result?



    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 16 Apr 2014 in reply to Jayesh Goyani Link to this post

    Hello,

    Please debug functionality of visual studio, please check from where this issue is raised.

    If you are not able to solve your problem then please provide your code.

    Thanks,
    Jayesh Goyani
Back to Top