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
1140
GroupByRow (indicators?) <-Not sure see below Select Groupby / Data Rows simultaneously
posted

Riddle me this... Why does the ultragrid throw the following exception when attempting to add a datarow to the selected rows collection when a groupbyrow is selected first? 

"Below Exception":

System.NullReferenceException: Object reference not set to an instance of an object.
   at Infragistics.Win.UltraWinGrid.Selected.SelectionPositionSortComparer.CompareRow(UltraGridRow rowX, UltraGridRow rowY)
   at Infragistics.Win.UltraWinGrid.Selected.SelectionPositionSortComparer.CompareRow(UltraGridRow rowX, UltraGridRow rowY)
   at Infragistics.Win.UltraWinGrid.Selected.SelectionPositionSortComparer.CompareRow(UltraGridRow rowX, UltraGridRow rowY)
   at Infragistics.Win.UltraWinGrid.Selected.SelectionPositionSortComparer.System.Collections.IComparer.Compare(Object x, Object y)
   at Infragistics.Win.Utilities.ComparerWrapper`1.Compare(T x, T y)
   at Infragistics.Win.Utilities.SortMergeHelper[T](T[ arr, T[ tmpArr, IComparer`1 comparer, Int32 si, Int32 ei)
   at Infragistics.Win.Utilities.SortMerge(Object[ arr, Object[ tmpArr, IComparer comparer, Int32 si, Int32 ei)
   at Infragistics.Win.Utilities.SortMerge(Object[ arr, IComparer comparer)
   at Infragistics.Win.UltraWinGrid.SelectedRowsCollection.AddRange(UltraGridRow[ rows, Boolean ensureRowsOrdered, Boolean fireSlectionChangeEvent)
   at Infragistics.Win.UltraWinGrid.SelectedRowsCollection.Add(UltraGridRow row)
   at BryceCorp.Win.ShopFloorUI.LabelReprintWizard.selectLabelGrid_InitializeRow(Object sender, InitializeRowEventArgs e) in C:\Users\dward\Documents\Visual Studio 2008\Projects\ShopFloorUIWIN\ShopFloorUIWIN\LabelReprintWizard.cs:line 400

 

Again this is just for curiosity, my current work around is to "unselect" the groupby row before the user attempts to select new datarows;  And could some one please explain the functionality of the Expansion Indicators that run the length of the left side of the grid?  I realize they look nice but do they really need to activate the group row they are attached to?  is there a way to shut that functionality off so the user must click the group row itself?  I've spent too much time today parsing the UIelements and I can not seem to find this particular element.

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi,

    You can't select both GroupBy and non-Group rows in the grid at the same time. This will not work through the UI and it should not work in code. 

    Having said that, the exception that you are getting here is not very useful or informative and should probably be corrected to display more meaningful information about why it occurred. You should Submit an incident to Infragistics Developer Support so they can get this corrected.

    dward1982 said:
    Again this is just for curiosity, my current work around is to "unselect" the groupby row before the user attempts to select new datarows;  And could some one please explain the functionality of the Expansion Indicators that run the length of the left side of the grid?  I realize they look nice but do they really need to activate the group row they are attached to?  is there a way to shut that functionality off so the user must click the group row itself?  I've spent too much time today parsing the UIelements and I can not seem to find this particular element.

    The ExpansionIndicator is inside the GroupByRow and any click within the GroupByRow selects the row. I don't think there is any way to turn this off. If you want to find the UIElement for any part of any Infragistics Winforms control, then I recommend you download the  Infragistics UIElementViewer Utility. This will allow you to mouse over an element and see what it is - it's really quite amazing. :)

     

Reply Children