Hi,We were using an UltraWebGrid version 8.2 in our application, where we were using the grouping feature, and it was working fine. In one of our enhancements we've upgraded to version 9.1. When we group for the first time, we do not get any error. However, on grouping for the second time, we are getting the following error: Infragistics.WebUI.UltraWebGrid.UltraGridLayout.GroupByColumnComparer.Compare(Object x, Object y) at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)Hi,We were using an UltraWebGrid version 8.2 in our application, where we were using the grouping feature, and it was working fine. In one of our enhancements we've upgraded to version 9.1. When we group for the first time, we do not get any error. However, on grouping for the second time, we are getting the following error: Infragistics.WebUI.UltraWebGrid.UltraGridLayout.GroupByColumnComparer.Compare(Object x, Object y) at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)Kindly help us with the same.Thanks in advance.Regards,RimiThanks in advance.Regards,Rimi
I have used the above already, but to no avail. I've even tried by setting IsGroupByColumn to false. But still getting the same issue.
Hello Rimi,
You may need to reset the columns, rows and bands. For example:
UltraWebGrid1.ResetBands()
UltraWebGrid1.ResetColumns()
UltraWebGrid1.ResetRows()
Here you go, Neha:
Normal 0 false false false EN-GB X-NONE X-NONE
at System.Web.HttpAsyncResult.End() at System.Web.UI.Page.AspCompatEndProcessRequest(IAsyncResult result) at ASP.ngrid_xml_grid_page_aspx.EndProcessRequest(IAsyncResult ar) at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)--- InnerException : System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: Failed to compare two elements in the array. ---> System.NullReferenceException: Object reference not set to an instance of an object. 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) --- End of inner exception stack trace --- at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer) at System.Collections.SortedList.IndexOfKey(Object key) at System.Collections.SortedList.get_Item(Object key) at Infragistics.WebUI.UltraWebGrid.UltraGridLayout.RegisterGroupByColumn(UltraGridColumn groupedColumn) at Infragistics.WebUI.UltraWebGrid.UltraWebGrid.GroupRows(RowsCollection rows, UltraGridColumn column) at Infragistics.WebUI.UltraWebGrid.UltraWebGrid.SortGroupRows(RowsCollection rows) at Infragistics.WebUI.UltraWebGrid.UltraWebGrid.PerformGroupRows() at Infragistics.WebUI.UltraWebGrid.UltraWebGrid.PreRenderGrid() at Infragistics.WebUI.UltraWebGrid.UltraWebGrid.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.Util.AspCompatApplicationStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Thanks,
Rimi
Hi Rimi,
To investigate this issue further, please provide me the full error message which you are getting while grouping on second time.
Let me know if you have any questions with this matter.
NehaDeveloper Support EngineerInfragisticswww.infragistics.com/support