This is a migrated thread and some comments may be shown as answers.

Grid Databind Issue

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sampath
Top achievements
Rank 1
Sampath asked on 20 Jun 2011, 08:15 AM
Hi, 

I m getting following error since last couple of days, when I try to load the application.
For last 2 years there was no issue with data binding. But since last week we are having this issue. This error occurs suddenly with out any modification in application code. Data source also not empty. 
Could you please provide solution for this issue.

ASPX
<RAD:RADGRID ID="radGridReports" RUNAT="server"></RAD:RADGRID>

CS Code
if (!IsPostBack)
{
radGridReports.DataSource = Staff.GetAll();
radGridReports.DataBind();
}


ERROR:
System.ArgumentOutOfRangeException was unhandled by user code
  Message="Specified argument was out of the range of valid values.\r\nParameter name: index"
  Source="System.Web"
  ParamName="index"
  StackTrace:
       at System.Web.UI.ControlCollection.get_Item(Int32 index)
       at Telerik.WebControls.GridGroupPanel.get_MainTable()
       at Telerik.WebControls.GridGroupPanel.InitializeIn(RadGrid grid, Boolean FromViewState)
       at Telerik.WebControls.RadGrid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding)
       at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data)
       at Telerik.WebControls.RadGrid.PerformSelect()
       at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
       at Telerik.WebControls.RadGrid.DataBind()
       at IRM.Authorised.AnalysisServices.Controls.FavoriteReports.ShowReports() in C:\CAMMS_Projects\Development 2.0.0.0\IRM_OnGoing\CAT.IRM.WebApplication\Authorised\AnalysisServices\Controls\FavoriteReports.ascx.cs:line 184
       at IRM.Authorised.AnalysisServices.Controls.FavoriteReports.Page_Load(Object sender, EventArgs e) in C:\CAMMS_Projects\Development 2.0.0.0\IRM_OnGoing\CAT.IRM.WebApplication\Authorised\AnalysisServices\Controls\FavoriteReports.ascx.cs:line 162
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.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.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)

Thanks and Best Regards,
Sampath Eleperuma

1 Answer, 1 is accepted

Sort by
0
Sampath
Top achievements
Rank 1
answered on 20 Jun 2011, 01:10 PM
Hi 

We found the issue,
in our application we have introduced new theme for ASP Tables in the skin file. Due to this error occurred. 
once we remove this part from the skin file it works successfully.

<asp:Table runat="server"  CssClass="aspTable">
    <asp:TableHeaderRow CssClass="aspTableHeaderRow">
        <asp:TableHeaderCell CssClass="aspTableHeaderCell" />
    </asp:TableHeaderRow>
    <asp:TableRow CssClass="aspTableRow">
        <asp:TableCell CssClass="aspTableCell" />
    </asp:TableRow>
</asp:Table>


Best Regards,
Sampath Eleperuma
Tags
Grid
Asked by
Sampath
Top achievements
Rank 1
Answers by
Sampath
Top achievements
Rank 1
Share this question
or