Problems navigating pages with sfgrid

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


7 Replies

MS Monisha Saravanan Syncfusion Team November 24, 2022 07:21 AM UTC


Hi Egidio,


Greetings from Syncfusion support.


Before proceeding further with your requirement kindly share the below details to validate further at our end.


  1. Share us the entire Grid code snippet along with model class.
  2. Share us whether you are facing issue at initial rendering or when performing specific operation.
  3. Share us whether you have used localization at your end.
  4. Kindly share us the video demonstration of the issue. So that it will be helpful for better understanding.
  5. Also share us whether you are facing the issue only after upgrading to our latest version?
  6. If possible kindly share us the simple issue reproduceable sample or try to reproduce the reported issue on the below mentioned sample.


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




EG egidio November 24, 2022 06:51 PM UTC


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));



MS Monisha Saravanan Syncfusion Team November 25, 2022 11:41 AM UTC


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



EG egidio replied to Monisha Saravanan November 29, 2022 04:37 PM UTC

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



MS Monisha Saravanan Syncfusion Team November 30, 2022 12:39 PM UTC

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.



EG egidio replied to Monisha Saravanan December 14, 2022 08:47 AM UTC

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



MS Monisha Saravanan Syncfusion Team December 16, 2022 03:42 AM UTC

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


Loader.
Up arrow icon