Hi,
I have a problem when using commom column header, I got a null reference exception,
I'm using pdb files to debug telerik gridviiew dll and exception occurs in CommonHeaderPresenter Class and ArrangeLowestHeaders() method.
To get this bug , set ColumnGroupName property of the first column of your grid to string.empty or set the first groupName to string empty.
Because lastGroupName = groupName = string.empty,
lastCommonHeader is not initialized and you have a null reference exception at line 142.
I have a problem when using commom column header, I got a null reference exception,
I'm using pdb files to debug telerik gridviiew dll and exception occurs in CommonHeaderPresenter Class and ArrangeLowestHeaders() method.
private void ArrangeLowestHeaders() { string lastGroupName = String.Empty; CommonColumnHeader lastCommonHeader = null; int span = 0; List<CommonColumnHeader> headers = new List<CommonColumnHeader>(); for (int i = 0; i < this.OrderedColumns.Count; i++) { string groupName = this.OrderedColumns[i].ColumnGroupName; if (lastGroupName != groupName) { lastGroupName = groupName; span = 0; CommonColumnHeader commonHeader = CreateCommonHeader(); this.CommonHeadersGrid.Children.Add(commonHeader); var group = FindGroupByName(groupName, this.ColumnGroups); commonHeader.ColumnGroup = group; commonHeader.Content = CommonHeaderPresenter.GetContent(group);//TODO this should happen in the header itself. SetTemplateAndStyle(commonHeader, group); commonHeader.SetValue(Grid.ColumnProperty, i); commonHeader.SetValue(Grid.RowProperty, this.RowCount - 1); commonHeader.HorizontalAlignment = HorizontalAlignment.Stretch; headers.Add(commonHeader); lastCommonHeader = commonHeader; } span++; lastCommonHeader.SetValue(Grid.ColumnSpanProperty, span); if (gridView.FrozenColumnCount > 0) { SelectiveScrollingGrid.SetSelectiveScrollingOrientation(lastCommonHeader, SelectiveScrollingOrientation.Vertical); } } if (RowCount > 1) { ArrangeHeadersAtRow(this.RowCount - 2, headers); } }To get this bug , set ColumnGroupName property of the first column of your grid to string.empty or set the first groupName to string empty.
Because lastGroupName = groupName = string.empty,
lastCommonHeader is not initialized and you have a null reference exception at line 142.