BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
As soon i updated the syncfusion application, it crashes on load.
If i revert back to version 26 it works again.
Xaml:
<datagrid:SfDataGrid
x:Name="Summary"
Grid.Row="1"
AllowEditing="False"
AutoGenerateColumns="False"
ColumnWidthMode="AutoLastColumnFill"
ItemsSource="{Binding Items, Mode=OneWay}">
<datagrid:SfDataGrid.Columns>
<datagrid:GridTextColumn
ColumnWidthMode="AutoLastColumnFill"
DisplayBinding="{Binding Value}"
HeaderText="" />
<datagrid:GridNumericColumn
AllowSorting="True"
DisplayBinding="{Binding Amount}"
DisplayNumberFormat="C2"
HeaderText="{m:LanguageResource Key=TotalAmount}" />
<datagrid:GridNumericColumn
AllowSorting="True"
DisplayBinding="{Binding Revenue}"
DisplayNumberFormat="C2"
HeaderText="{m:LanguageResource Key=TotalRevenue}" />
<datagrid:GridNumericColumn
AllowSorting="True"
DisplayBinding="{Binding VAT}"
DisplayNumberFormat="N2"
HeaderText="{m:LanguageResource Key=TotalVAT}" />
<datagrid:GridNumericColumn
DisplayBinding="{Binding Discount}"
DisplayNumberFormat="C2"
HeaderText="{m:LanguageResource Key=TotalDiscounts}" />
</datagrid:SfDataGrid.Columns>
</datagrid:SfDataGrid>
NullReferenceException:
at Syncfusion.UI.Xaml.DataGrid.DataGridColumnSizer.SetSizerWidth(Double viewPortWidth)
at Syncfusion.UI.Xaml.DataGrid.DataGridColumnSizer.Refresh(Double AvailableWidth, Boolean needToInvalidateMeasure)
at Syncfusion.UI.Xaml.DataGrid.DataGridColumnSizer.InitialRefresh(Double AvailableWidth, Boolean needToInvalidateMeasure)
at Syncfusion.UI.Xaml.DataGrid.RowGenerator.ApplyColumnSizeronInitial(Double availableWidth)
at Syncfusion.UI.Xaml.DataGrid.VisualContainer.MeasureOverride(Size constraint)
at Microsoft.UI.Xaml.FrameworkElement.Microsoft.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|38_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(IObjectReference _obj, Size availableSize)
at Microsoft.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
at Syncfusion.UI.Xaml.DataGrid.SfDataGrid.MeasureOverride(Size availableSize)
at Microsoft.UI.Xaml.FrameworkElement.Microsoft.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|38_0(Int32 hr)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverridesMethods.MeasureOverride(IObjectReference _obj, Size availableSize)
at Microsoft.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)
at Microsoft.UI.Xaml.FrameworkElement.Microsoft.UI.Xaml.IFrameworkElementOverrides.MeasureOverride(Size availableSize)
at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_MeasureOverride_0(IntPtr thisPtr, Size availableSize, Size* result)
I get exactly the same error.
Error goes away if I set AutoGenerateColumns to True and remove the <Columns> part of the XAML.
I have edited your project to include the grid that I have been developing, and this shows the same error as Ismail is reporting.
You will need to Rebuild as I omitted the bin and obj files, otherwise the file size to upload was 800MB.
This app crashes immediately in the unhandled app block when in the dev environment. The error is an exception with a StackTrace location of SyncFusion.UI.Xaml.DataGrid.DataGridColumnSizer.SetSizerWidth. The exception message is "Object is not set to an instance of an object".
This same code worked fine with SyncFusion v25.
Thanks,
Jon Perkins
Dear Manikanda,
The m:LanguageResource is an markup extension that takes as resx value and returns the localized string.
I use it through out the whole application and can assure you that's not the problem.
More info about this markup extension: I-Synergy Framework > LanguageResource
Hello Manikanda,
Many thanks for your quick response. I apologise for the error in my code. I used some real code but tried to make a few modifications to help with readability and of course made an error. However it does seem to have helped you identify an issue with this control and I am grateful that you will hopefully have a fix in such a short timescale.
With my gratitude,
Jon Perkins
Hi Jon Ponkins,
Thank you for your understanding and kind words. We appreciate your prompt response and the effort you put into clarifying your code. We remain committed to delivering the fix within the promised timeline.
We will notify you once it has been released. We appreciate your patience in the meantime.
Regards,
Manikanda Akash
same error
Hi Chat Point,
We have followed the same replication procedure to reproduce the exception on our end. Unfortunately, the exception does not occur in version 27.1.51 or the latest version. Could you please check if the same exception occurs in the latest version or version 27.1.51? If it does, could you kindly provide the replication procedure along with a video reference to help us reproduce the exception?
Regards,
Sreemon Premkumar M.