I am seeing the following exception being thrown when installing ` 20.2.0.46`. This does not occur in ` 20.2.0.40`:
```
Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Blazor.Grids.SfGrid`1.GetClass()
at Syncfusion.Blazor.Grids.SfGrid`1.OnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit 'Q4ShmjKWXGjSMs8dAfR-mlmHLqfvXe30h-MR2EOtnDo'.
System.NullReferenceException: Object reference not set to an instance of an object.
at string Syncfusion.Blazor.Grids.SfGrid<TValue>.GetClass()
at async Task Syncfusion.Blazor.Grids.SfGrid<TValue>.OnParametersSetAsync()
at async Task Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at async Task Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
[2022-09-01T14:13:48.000Z] Error: System.NullReferenceException: Object reference not set to an instance of an object.
at string Syncfusion.Blazor.Grids.SfGrid<TValue>.GetClass()
at async Task Syncfusion.Blazor.Grids.SfGrid<TValue>.OnParametersSetAsync()
at async Task Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at async Task Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
```
Hi Mike-E,
Greetings from Syncfusion support.
We checked your query and you facing issue in the latest issue 20-2-0-46.We need some more information, Kindly share the below details to validate further at our end.
The above-requested details will be helpful for us to validate the reported query at our end and provide the solution as early as possible.
Regards,
Naveen Palanivel
Thank you for your time and investigation into this matter, @Naveen.
Unfortunately, I do not have a simple reproduction/solution that I can provide for you easily. I am not sure a video will assist, either.
However, I do have some further information that may assist you in tracking this down.
This appears to be due to the use of a `class` attribute in my SfGrid markup which is causing this issue. Here is a screenshot of where the exception takes place (note that there appears to be a symbol location issue and this is really throwing on line 419):
https://i.imgur.com/otZGA5O.png
(Note further that I could not add the above picture to this post as it's complaining about it being over 100KB).
Subsequently, I added the UnMatchedAttributes property to the Watch window. Notice how it reports true for containing the "class" key, but when actually accessed, it returns null:
So, there appears there is a bug in 20.2.0.46 in the SfGrid.UnMatchedAttributes collection where the ContainsKey returns true but the returned value is actually null.
Please let me know if there is any further information that I can provide to further diagnose this issue with you.
Hi Mike-E,
We checked your query and gave the SfGrid a custom class property(Class=”test”). We verify that the specified custom class has been added to the grid in the browser. The issue does not replicate from our end, and we have also attached the screenshot below.
Kindly share us what kind of issue you facing and let us know if the custom class of the grid is updating properly or not.
Please get back to us if you need further assistance.
Regards,
Naveen Palanivel
Hi Naveen,
Thank you for the reply. I can confirm that this is a definite issue that does not exist in 20.2.0.40. At first glance, I am curious if you have tried `class="test"` rather than `Class="test"`. Note that I am using lowercase `class`. If that does not reproduce it on your side I will further investigate a reproducible solution for you.
Thank you for your continued assistance.
Put a checkbox column as the first column and the error should resolve itself. At least it did for me and my use case. Even making the checkbox column not visible the error is still gone.
Hi Charles,
Sorry to the inconvenience,
We check your query and we like to inform that we also using the lowercase “class” in grid. We accidently send uppercase custom class in pervious response, but reported issue does not occurs at our end .
Can you please share simple
issue reproduceable sample to validate further at our end.
Regards,
Naveen Palanivel
Thank you for the workaround @Charles. Are you able to provide Syncfusion a simple repro for their investigation? If not I can try to widdle one down. Things are pretty busy for me here so finding time is a challenge ATM.
Here you go Team Syncfusion. This throws the error in .46 but not .40:
Hi Mike-E,
Sorry for the inconvenience.
We are currently Validating the reported query at our end and we will update the further details within two days. Until then we appreciate your patience.
Regards,
Naveen Palanivel
No problem Naveen. I appreciate the update and collaboration.
Hi Mike
We check your query and issue is reproduced we will validating at our end . In the meantime we can given alternate way to overcome the issue to change nullable string to non nullable string. We attached the code snippet below , please refer the code snippet for your reference.
|
string Class { get { return string.Empty; } }
|
Please get back to us if you need further assistance
Regards,
Naveen Palanivel
Thank you for the update @Naveen. I wanted to verify that you are fixing this for a future version as while this is a workaround, it is still a breaking change for a minor version update. Additionally (it should go without saying but will say it anyways :)) null references should be accounted for on your side as an API provider.
Thank you for any further consideration and efforts.
Hi Mike,
We have confirmed this as an issue and logged the defect report “Appears there is a bug in the SfGrid.UnMatchedAttributes collection” for the same. Thank you for taking time to report this issue and helping us to improve our product. At Syncfusion, we are committed to fix all validated defects (subject to technological feasibility and Product Development Life Cycle) and this fix will be included in our upcoming patch release which is expected to be rolled out on or before 19th Oct , 2022.
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”
Until then we appreciate your patience.
Regards,
Naveen Palanivel
Thank you for the update Naveen, it is appreciated, along with all of your efforts over there. I very much enjoy the quality of your controls. 🙏
Hi Mike,
Sorry for the Inconvenience.
We are facing difficulties in fix, so we are not able to include the reported “Appears there is a bug in the SfGrid.UnMatchedAttributes collection” in our mentioned patch release as promised. We have planned to include this in our upcoming patch release which is expected to be rolled out by 16th Nov 2022.
Till then we appreciate your patience.
Regards
Naveen Palanivel
Thank you for the update, Naveen.
Hi Mike,
Welcome
we will get back to you once the release is rolled out.
Until then we appreciate your patience.
Regards,
Naveen Palanivel
Hi Mike
We are glad to announce that, we have included fix for the
issue “Appears there is a bug in the SfGrid.UnMatchedAttributes
collection” in our release (20.3.0.59). So please upgrade to our
latest version of Syncfusion NuGet package to resolve the reported issue.
Please find the Nuget package for latest fixes and features from below.
Nuget : https://www.nuget.org/packages/Syncfusion.Blazor.Grid
We appreciate your patience in waiting for this release.
Regards,
Naveen