Hello,
I have a UltraWinGrid which has at least one GroupBy column (Outlook Group By). I want to select all GroupByRows and Data rows on the grid (Even the ones invisible. I have a function to export the selected rows to excel). I have problems with selecting ChildBand's (lower level GroupByRows and Data rows).
I can select the first level GroupByRows by this.
theUltraGrid.Selected.Rows.AddRange(theUltraGrid.Rows.All)
However, I get 'NullReferenceException' when I try to add ChildBand's rows to SelectedRows.
I am doing something like this. (In the real code I do it recursively)
theUltraGrid.Selected.Rows.AddRange(theUltraGrid.Rows(0).ChildBands(0).Rows.All)
I get the following exception.
{"Object reference not set to an instance of an object."} at Infragistics.Win.UltraWinGrid.Selected.SelectionPositionSortComparer.CompareRow(UltraGridRow rowX, UltraGridRow rowY) ...
I tried it in several different ways but I always get the same exception. I am wondering if my code has problems or the way I do is completely wrong. Please give me advice.
Thanks!
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=4340
Hi Mike,
PFA please suggest me how can i (un)checked group level checkbox on all child (un)checked
My requirement like as above mention description but i am not able to do that can you help me for that
Hi Mike, If I clear the previous selected rows before adding new data rows then it is working fine.
Grid.Selected.Rows.Clear();
Grid.Selected.Rows.AddRange((UltraGridRow[])rows.All);
Thanks,
Kudumula.
Why are you getting a NullReferenceException? What is null?