Welcome to the Xamarin.Forms feedback portal. We’re happy you’re here! If you have feedback on how to improve the Xamarin.Forms, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
NullReferenceException is raised after debugging when we declare GridTemplateColumn without CellTemplate in XAML and CellTemplate is added in code behind after GridView is created.
Call Stack.
at Syncfusion.SfDataGrid.XForms.XamarinExtentions.CreateTemplateContent (Xamarin.Forms.DataTemplate template) [0x00000] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.GridCellTemplateRenderer.OnInitializeDisplayView (Syncfusion.SfDataGrid.XForms.DataColumnBase dataColumn, Xamarin.Forms.View view) [0x0004e] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.GridVirtualizingCellRendererBase`2[T1,T2].InitializeDisplayView (Syncfusion.SfDataGrid.XForms.DataColumnBase dataColumn, T1 view) [0x00000] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.GridVirtualizingCellRendererBase`2[T1,T2].OnPrepareViews (Syncfusion.SfDataGrid.XForms.DataColumnBase dataColumn) [0x00060] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.GridCellRendererBase.PrepareViews (Syncfusion.SfDataGrid.XForms.DataColumnBase dataColumn) [0x00000] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.DataColumn.OnInitializeColumnElement (System.Object rowData, System.Boolean isInEdit) [0x00024] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.DataColumnBase.InitializeColumnElement (System.Object rowData, System.Boolean isInEdit) [0x00000] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.DataRow.CreateColumn (System.Int32 index) [0x00162] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.DataRow.OnGenerateVisibleColumns (Syncfusion.GridCommon.ScrollAxis.VisibleLinesCollection visibleColumnLines) [0x00123] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.DataRowBase.InitializeDataRow (Syncfusion.GridCommon.ScrollAxis.VisibleLinesCollection visibleColumnsLines) [0x0000c] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.RowGenerator.CreateDataRow (System.Int32 rowIndex, Syncfusion.GridCommon.ScrollAxis.VisibleLinesCollection visibleColumns, Syncfusion.SfDataGrid.XForms.RowRegion region) [0x001a5] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.RowGenerator.PreGenerateRows (Syncfusion.GridCommon.ScrollAxis.VisibleLinesCollection visibleRows, Syncfusion.GridCommon.ScrollAxis.VisibleLinesCollection visibleColumns) [0x000a0] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.VisualContainer.PregenerateItems () [0x00030] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.VisualContainer.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00168] in <027e75a004ef4d878aa488edd5a63d8d>:0
at Syncfusion.SfDataGrid.XForms.VisualContainer.GetSize (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in <027e75a004ef4d878aa488edd5a63d8d>:0