Rank: Member Groups: Member
Joined: 7/12/2008 Posts: 19
|
I am having an issue when I try to re-bind to the gridtable after a post back. I get the following error.
System.IndexOutOfRangeException was caught Message="2" Source="System.Data" StackTrace: at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) at System.Data.SqlClient.SqlDataReader.get_Item(String name) at EO.Web.Internal.dp.a(Object A_0, String A_1) at EO.Web.Grid.a(Int32 A_0, Object A_1) at EO.Web.Grid.a(IEnumerable A_0) at EO.Web.Grid.e() at EO.Web.DataBoundControl.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBind() at _Default.GridViewClaim_SelectedIndexChanged(Object sender, EventArgs e) in C:\ClaimDispatchWebSite\ClaimEdit.aspx.vb:line 447
I initially bind to the grid with no problem after some processing and I try to bind a different set of data to teh grid I get the error. The error occurs on the bind.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
This appears to be caused by an invalid data field set either in your GridColumn's DataField property, or Grid.KeyField property.
Thanks!
|