Hi,
I don't know what has changed within internals since version 20.2.0.38, but it is impossible to fill a datagrid without having such error stack :
I am using Net Core 6.0.7 under Windows 10, Blazor & Webassembly as client and ASP NET CORE as server
Excepti this error, the most funny is that Grid loads well!
Any explanations?
What is supposed to be changed since version 20.2.0.38?
If I use previous version, it works without his error
Yours
Hi,
I've found the root cause of this cascading errors!
I have an ASPNET Core server, that was initially build for Blazor Server, I have migrated from Net Core 3.1 to 5.0 then to 6.0 now to 6.0.7 and then since SF version 20.2.2.38 it was spitting all these errors because of these lines of code from the server side :
services.AddServerSideBlazor(); //=> crash serializer as of Net Core 6 + SF 20.2.2.38!
...
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub(); //=> crash serializer as of Net Core 6 + SF 20.2.2.38!
...
To fix the problem, simply remove these services dependencies then all errors mentionned before will dissapear... but for server that does not use/support Blazor, else these problems will remain
These informations can be useful to share with your DEV team
Yours
Hi Gerome,
Greetings from Syncfusion support
We are quite unclear about the exact issue you are facing. So before proceeding further with your requirement 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
Hi Naveen,
Please read my reply, i explained what happened and the root cause as well
Yours
Hi Gerome,
Sorry for the inconvenience caused and also thanks for the solution here.
Query: “imply remove these services dependencies then all errors mentionned before will dissapear... but for server that does not use/support Blazor, else these problems will remain These informations can be useful to share with your DEV team”
As per your suggestion, we have prepared a sample with Blazor server for datasource and Blazor WASM for Grid component using .NET 6.0.7. We are unable to reproduce the reported issue at our end. Kindly refer to the below sample for your reference. It contains two projects, BlazorApp1 for datasource and BlazorApp2 for a Grid code example.
We suspect the reported issue might have occurred when upgrading the existing sample from Dot Net 3.1 to 6.0.7. But we have ensured by creating the new sample using 6.0.7. So if you are facing this scenario, kindly ensure the same by creating a new sample.
If not kindly share the simple issue reproducible sample or
try to reproduce the reported issue in the provided sample.
Regards,
Vignesh Natarajan
Hi,
For sure the examples you shared are NOT exactly what I've told you.
First the server side is an ASPNET CORE ONLY, no Blazor server at all, just a regular ASPNET CORE server.
Originally it was designed for beeing a standard one, please read again my words.
Then, the Webassembly client side uses a Custom Data Adapter which derives:
/// <summary>
/// Implement custom adaptor by extending the Synfusion DataAdaptor class
/// </summary>
/// <typeparam name="TEntity"></typeparam>
public interface IWasmDataAdaptor<TEntity> where TEntity : class, new()
{
// Synfusion DataAdaptor CRUD
Task<object> BatchUpdateAsync(DataManager dataManager, object changedRecords, object addedRecords, object deletedRecords, string keyField, string key, int? dropIndex);
Task<object> ReadAsync(DataManagerRequest dataManagerRequest, string key = null);
Task<object> RemoveAsync(DataManager dataManager, object data, string keyField, string key);
Task<object> UpdateAsync(DataManager dataManager, object data, string keyField, string key);
}
/// <summary>
/// Implement custom adaptor by extending the DataAdaptor class wired onto native HttpClient
/// </summary>
/// <typeparam name="TEntity"></typeparam>
public class WasmDataAdaptor<TEntity> : DataAdaptor, IWasmDataAdaptor<TEntity> where TEntity : class, new()
...
Then within the ReadAsync I use HTTP calls to invoke a GENERIC controller from the ASPNET server side, encapsulated fom a 'proxy' class that is in charge of calling CRUD operations, here for the ReadAsync I use
GetPagedQueryableAsync that is in charge to request expected datas from the server
var dataResult = await _proxyCore.GetPagedQueryableAsync<TEntity>(dataManagerRequest).ConfigureAwait(false);
All the implementation uses GENERICS and generics only <TEntity>
then the DataGrid is a TEMPLATE inspired by the one that is given from the syncfusion Blazor documentation pages, so all my datagrids are deriving :
<div [email protected] class="col-12 control-section mainDataGridPosition">
<div class="row no-gutters">
<SfGrid TValue="TEntity"
ID="@GetGridId"
RowHeight="36"
AllowExcelExport="@(AllowCsvExport || AllowExcelExport)"
...
@* Adaptor settings *@
<SfDataManager AdaptorInstance="typeof(IWasmDataAdaptor<TEntity>)" Adaptor="Adaptors.CustomAdaptor" />
</SfGrid>
Hi Gerome,
We checked your query and currently we are preparing sample as per your suggestion. We will update the further details in three business day as promised (Aug 3, 2022). Until then we appreciate your patience.
Regards,
Naveen Palanivel
Hi,
I am also facing this same issue, using v 20.2.0.46, This is a Blazor Server App, in my case things are working fine except for 1 location where you have detailed templates for SfGrid, something like:
Top level Grid -> Detail Templates having Tabs -> Grid having detail template in one of the Tabs -> On expand of this Grid, after the Detail Expand event has executed, this error is raised.
If the DetailDataBind is empty, no errors are thrown, but if it references a API, it gives the aforementioned error. To test it, I moved the SfGrid outside the Tab and created a new component and tried to access it and it works fine without any issues.
Mani
Hi Mani,
Sorry for the delay in getting back to you.
Previously, we also faced the same issue at our end until version 20.4.0.38 (2022 Volume 4 release) when switching between the tabs rapidly. Now we have resolved the reported issue and included it with our 20.4.0.40 release. We have ensured the same by running the sample using an older version (20.4.0.38) and the latest version (20.4.0.40) of the NuGet package.
So we request that you ensure the reported issue by upgrading the Syncfusion Blazor Nuget package to version 20.4.0.40 or the latest version 20.4.0.50.
Please get back to us if you are still facing the reported issue in our latest version
Regards,
Vignesh Natarajan
Hi Mani ,
Sorry for the Inconvenience.
We are currently Validating the reported query at our end and we will update the further details within two days(Sep 06, 2022). Until then we appreciate your patience.
Regards,
Naveen Palanivel