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
465
Is there a way to groupby rows and its rows both selected at the same time?
posted

I have a grid with multiple levels of groupby, and I want to be able to select a groupby row, it automatically selects all its rows under the groupby recursively, which can include another groupby row.

I have the logic on finding all rows needed to be selected, but I ran into this exception when adding the rows through Grid.Selected.Rows.AddRange(), with a list of rows include both UltraGridGroupByRow and UltraGridRow.

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.UltraWinGrid.SelectedRowsCollection.AddRange(UltraGridRow[] rows, Boolean ensureRowsOrdered, Boolean fireSlectionChangeEvent)

Looks like it failed in the sort comparer deep into Infragistics classes, which I thought AddRange(UltraGridRow[] rows, bool ensureRowsOrdered, bool fireSlectionChangeEvent), if I pass in ensureRowOrdered parameter = false, it will not try to sort, but I still get the exception.

Is there a way to achieve what I am looking for?  Here is a illustration on what I am looking for.  Thanks.

Michael

Parents
No Data
Reply
  • 7315
    Offline posted

    Hello Michael, 

    I discussed this matter with the development team and found that there is no way grid support group by rows selection at the same time. This could be a new product idea. 

    You can suggest new product ideas for future versions by emailing ideas@infragistics.com.

    Submitting your idea will send it directly to our product management team so that it can be imported into our new ideas community once live: http://ideas.infragistics.com.

    Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case.  You can also link back to this thread for additional details. 

    Thank you in advance to submitting your product idea.

Children
No Data