OutOfRangeException
-
Hello Friends, protected void grdEncounter_RowDataBound(object o, GridViewRowEventArgs e) { GridViewRow grdEditRow = e.Row; if (grdEditRow.RowType.Equals(DataControlRowType.Header)) return; grdEditRow.Cells[2].Text = grdEditRow.Cells[2].Text.Equals("1") ? "Yes" : "No"; } error comes in above line Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index This is the error while loading itself i don't know how to solve. Regards JK
-
Hello Friends, protected void grdEncounter_RowDataBound(object o, GridViewRowEventArgs e) { GridViewRow grdEditRow = e.Row; if (grdEditRow.RowType.Equals(DataControlRowType.Header)) return; grdEditRow.Cells[2].Text = grdEditRow.Cells[2].Text.Equals("1") ? "Yes" : "No"; } error comes in above line Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index This is the error while loading itself i don't know how to solve. Regards JK
seems like your grdEditRow.Cells doesn't have a cell with index = 2
Intelligence is almost useless for those who have nothing else! Email: caiokf@gmail.com
-
Hello Friends, protected void grdEncounter_RowDataBound(object o, GridViewRowEventArgs e) { GridViewRow grdEditRow = e.Row; if (grdEditRow.RowType.Equals(DataControlRowType.Header)) return; grdEditRow.Cells[2].Text = grdEditRow.Cells[2].Text.Equals("1") ? "Yes" : "No"; } error comes in above line Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index This is the error while loading itself i don't know how to solve. Regards JK
-
Hello Friends, protected void grdEncounter_RowDataBound(object o, GridViewRowEventArgs e) { GridViewRow grdEditRow = e.Row; if (grdEditRow.RowType.Equals(DataControlRowType.Header)) return; grdEditRow.Cells[2].Text = grdEditRow.Cells[2].Text.Equals("1") ? "Yes" : "No"; } error comes in above line Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index This is the error while loading itself i don't know how to solve. Regards JK