i have the following problem, browsing blazor wasm pages with sfgrid the error appears:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: ArgumentNull_Generic Arg_ParamName_Name, format
System.ArgumentNullException: ArgumentNull_Generic Arg_ParamName_Name, format
at System.ArgumentNullException.Throw(String )
at System.ArgumentNullException.ThrowIfNull(Object , String )
at System.String.FormatHelper(IFormatProvider provider, String format, ReadOnlySpan`1 args)
at System.String.Format(String format, Object arg0, Object arg1)
at Syncfusion.Blazor.Navigations.SfPager.BuildRenderTree(RenderTreeBuilder __builder)
at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__6_0(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder , RenderFragment , Exception& ).
I followed the instructions given here: https://www.syncfusion.com/forums/174705/grid-pager-has-broken-after-upgrading-to-20-1-51 but the problem continues: in debug it works regularly but on the published site it doesn't work.
i use version 20.3.57 and publish to iis windows server
Hi Egidio,
Greetings from Syncfusion support.
Before proceeding further with your requirement kindly share the below details to validate further at our end.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ClientApp892183147.zip
The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.
Regards,
Monisha
The problem is found in the first rendering phase and only on the published site (in debug mode with visual studio it works normally).
This is the code:
<div class="@IsVisible">
<div style="background-color:lightgray">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden="hidden" />
<h1>Patient Types</h1>
<SfGrid @ref="dg" DataSource="@list" AllowPaging="true" AllowSorting=true AllowFiltering="true" Locale="it">
<GridPageSettings PageSize="21"></GridPageSettings>
<GridSelectionSettings Mode="SelectionMode.Row" Type="SelectionType.Single" />
<GridEvents OnRecordDoubleClick="GridRowDoubleClicked" TValue="SmartBinding" />
<GridColumns>
<GridColumn HeaderText="Description" Field="Description" />
</GridColumns>
</SfGrid>
</div>
</div>
In program.cs I added:
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("it");
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("it");
builder.Services.AddSyncfusionBlazor();
builder.Services.AddSingleton(typeof(ISyncfusionStringLocalizer), typeof(SyncfusionLocalizer));
Hi Egidio,
From your update we could see that you are facing issues after publishing. If so kindly share us whether you have published using IIS or any other way. If you have published the application using IIS then kindly ensure that the published folder contains the localization files. If not then kindly share us how you have published the Blazor Application at your end.
|
|
Also if possible share us an video demonstration of the issue. It will be very helpful for us to validate further at our end.
Please let us know if you have any concerns
the site was published on IIS windows server 2022 and copied with remote desktop.
I attach video of the problem and the path of the resource.
tanks
Attachment: ImageFolder_fb971e0c.zip
Hi Egidio,
We have checked the reported issue after deploying the project using IIS. But we could not able to reproduce the reported issue. We have included the sample and video demo and the published folder for your reference.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorApp11153973274.zip
Published folder: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Orders-2096608539.zip
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/video-iis-2014549745.zip
If the reported issue still reproduced then if possible kindly share us an issue replicating sample or try to reproduce the reported issue on the above mentioned sample.
after several attempts, I deleted the it resource and the SyncfusionLocalizer class created in an external dll and referenced in the main project, then I inserted these directly into the main project and now it seems to work.
tanks
Hi Egidio,
Welcome.
We are glad to hear that the reported issue has been resolved. So we are proceeding to mark this ticket as closed. Kindly get back to us if you have further queries. As always we will be happy to help you.
Regards,
Monisha