Error: Index was out of range. Must be non-negative and less than the size of the collection
ASP.NET
3
Posts
2
Posters
0
Views
1
Watching
-
I have a function in which I bind my Gridview with the Datalist according to the info that i get from the Row in Datalist My Code Behind function is:
protected void dtlGradeMaster\_ItemDataBound(object sender, DataListItemEventArgs e) { GridView grdGradeDetails = (GridView)e.Item.FindControl("grdGradeDetails"); BindDetailGrid(grdGradeDetails, dtlGradeMaster.DataKeys\[e.Item.ItemIndex\].ToStrin()); } private void BindDetailGrid(GridView GridView, string strGrade) { DataTable GridData = GridDataSource(strGrade); GridView.DataSource = GridData; GridView.DataBind(); }
But it gives me the Fallowing Error plss help...
-
I have a function in which I bind my Gridview with the Datalist according to the info that i get from the Row in Datalist My Code Behind function is:
protected void dtlGradeMaster\_ItemDataBound(object sender, DataListItemEventArgs e) { GridView grdGradeDetails = (GridView)e.Item.FindControl("grdGradeDetails"); BindDetailGrid(grdGradeDetails, dtlGradeMaster.DataKeys\[e.Item.ItemIndex\].ToStrin()); } private void BindDetailGrid(GridView GridView, string strGrade) { DataTable GridData = GridDataSource(strGrade); GridView.DataSource = GridData; GridView.DataBind(); }
But it gives me the Fallowing Error plss help...
-
Thanks... Its working now...