Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Failed to compare two elements in the array on second round of databinding
posted

Hi,

 

I have a simple page with two AJAX UpdatePanels. In the top panel I have a ThinkGeo Map and in the bottom panel I have an UltrWebGrid.

Selecting some features on the map populates a DataTable which is used as the Datasource for the Grid.

I group the Grid by the type of feature using:

 

 

 

protected void SelectionDetailsGrid_DataBound(object sender, EventArgs ){

 

 

Infragistics.WebUI.UltraWebGrid.UltraWebGrid gv = sender as Infragistics.WebUI.UltraWebGrid.UltraWebGrid;

 

 

if (col.Header.Caption.ToUpper() == "TERRITORY"){

 

 

col.IsGroupByColumn = true;}

 

 

 

 

gv.PerformGroupRows();

 

 

 

gv.ExpandAll(true);

}

All of this works fine on the first selection and the grid behaves as expected. However, on subsequent selections, the exception below is thrown. Just to be sure, I did apply the following code (based on suggestions of an earlier post) before rebinding my grid to the DataTable on subsequent selection.

gv.ResetBands()

gv.ResetRows()

gv.ResetColumns().

This made no difference and I still get this error.

System.InvalidOperationException was unhandled by user code
  Message="Failed to compare two elements in the array."
  Source="mscorlib"
  StackTrace:
       at eMap.MainApp.Map1_TrackShapeFinished1(Object sender, EventArgs e) in C:\DEV\T5\T5.eMap\Trunk\eMap\MainApp.aspx.cs:line 211
       at ThinkGeo.MapSuite.WebEdition.Map.OnTrackShapeFinished()
       at ThinkGeo.MapSuite.WebEdition.Map.x3296715cc7992de2(String x055cc4f8164153bb)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException: System.NullReferenceException
       Message="Object reference not set to an instance of an object."
       Source="Infragistics35.WebUI.UltraWebGrid.v8.3"
       StackTrace:
            at Infragistics.WebUI.UltraWebGrid.UltraGridLayout.GroupByColumnComparer.Compare(Object x, Object y)
            at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
       InnerException:

Parents Reply Children
No Data