Hi,
I'm currently attempting to use the sfDataGrid with the ColumnSizer set to Auto like so:
<syncfusion:SfDataGrid x:Name="dataGrid" ItemsSource="{Binding LandFormInformation}" FontSize="12" AllowGroup="True" AutoGenerateColumns="False"HorizontalContentAlignment="Stretch" IsGroupDropAreaExpanded="True" AllowResizeColumns="True" AllowSort="False" ColumnSizer="Auto">
<syncfusion:SfDataGrid.GroupColumnDescriptions>
<syncfusion:GroupColumnDescription ColumnName="Id"/>
</syncfusion:SfDataGrid.GroupColumnDescriptions>
The data binding is a IList<object> which has data at binding time.
Whenever the page loads it generates the following exception:
System.NullReferenceException
at Syncfusion.UI.Xaml.Grid.GridColumnSizer.<>c__DisplayClass17.<SetSizeToHeaderWidth>b__13(DataColumnBase col)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
at Syncfusion.UI.Xaml.Grid.GridColumnSizer.SetSizeToHeaderWidth(GridColumn column)
at Syncfusion.UI.Xaml.Grid.GridColumnSizer.SetGridSizerWidth(Double totalColumnSize, List`1 calculatedColumns, GridColumn lastColumn, Double viewPortWidth)
at Syncfusion.UI.Xaml.Grid.GridColumnSizer.SetSizerWidth(Double viewPortWidth)
at Syncfusion.UI.Xaml.Grid.GridColumnSizer.RefreshAll(Double AvailableWidth)
at Syncfusion.UI.Xaml.Grid.GridColumnSizer.InitialRefreshAll(Double AvailableWidth)
at Syncfusion.UI.Xaml.Grid.RowGenerator.ApplyColumnSizeronInitial(Double availableWidth)
at Syncfusion.UI.Xaml.Grid.VisualContainer.ArrangeOverride(Size finalSize)
at Windows.UI.Xaml.UIElement.Arrange(Rect finalRect)
at Syncfusion.UI.Xaml.Grid.ScrollableContentPresenter.ArrangeOverride(Size finalSize)
at Windows.UI.Xaml.FrameworkElement.ArrangeOverride(Size finalSize)
at Windows.UI.Xaml.FrameworkElement.ArrangeOverride(Size finalSize)
at Syncfusion.UI.Xaml.Grid.SfDataGrid.ArrangeOverride(Size finalSize) at Windows.UI.Xaml.FrameworkElement.ArrangeOverride(Size finalSize)
Any help would be appreciated.
Thannks.