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
1775
System.NullReferenceException in Infragistics.Controls.Grids.UnboundColumn.GenerateDataCell(RowBase row)
posted

Hello.

We are using xamGrid 11.1.

We create some columns in code

TextColumn col1 = new TextColumn() { Key = "Col1", HeaderText = "Number" };
            TextColumn col2 = new TextColumn() { Key = "Col2", HeaderText = "Name" };
            TextColumn col3 = new TextColumn() { Key = "Col3", HeaderText = "LastName" };
            TextColumn col4 = new TextColumn() { Key = "Col4", HeaderText = "Adress" };
            TextColumn col5 = new TextColumn() { Key = "Col5", HeaderText = "Bool" };
            TextColumn col6 = new TextColumn() { Key = "Col6", HeaderText = "Balance" };
            TextColumn col7 = new TextColumn() { Key = "Col7", HeaderText = "Balance1" };
            TextColumn col8 = new TextColumn() { Key = "Col8", HeaderText = "Balance2" };
            TextColumn col9 = new TextColumn() { Key = "Col9", HeaderText = "Balance3" };
            TextColumn col10 = new TextColumn() { Key = "Col10", HeaderText = "Balance4" };
            TextColumn col11 = new TextColumn() { Key = "Col11", HeaderText = "Balance5" };

and add it to grid.

Then we create an UnboundColumn

UnboundColumn col0 = new UnboundColumn()
            {
                Key = "Col0",
            };

and group grid by this unboundColumn in code

xamGrid1.GroupBySettings.GroupByColumns.Add(xamGrid1.Columns["Col0"] as Column);

Let's see some situations.

1) XamGrid.ConditionalFormattingSettings.AllowConditionalFormatting is set to False

All is working.

2) XamGrid.ConditionalFormattingSettings.AllowConditionalFormatting is set to True

    2.1) We don't expand the group by UI and remove grouping - all is fine

    2.2) We expand the group by UI

           2.2.1)Unbound column is in visible area of screen. We remove grouping - all is ok.

           2.2.2)UnboundColumn isn't in visible area of screen. We remove grouping and have System.NullReferenceException in Infragistics.Controls.Grids.UnboundColumn.GenerateDataCell(RowBase row)