Pivot: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'GetText' at CallSite.

Hi,

I have an error when i use a pivot with  ShowToolbar="true" ShowFieldList="true".

Version: 21.2.10

O.S.: Windows 11

NET 6.0

Visual Studio 2022 

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'GetText' at CallSite.Target(Closure , CallSite , Object , String ) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Syncfusion.Blazor.PivotView.Internal.ErrorDialog`1.<BuildRenderTree>b__11_4(RenderTreeBuilder __builder4) at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment) at Syncfusion.Blazor.Popups.DialogButtons.<BuildRenderTree>b__16_0(RenderTreeBuilder __builder2) at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)


Attachment: pivot_98744659.zip

5 Replies

AD Andrea Del Signore June 22, 2023 07:42 AM UTC

Same problem in 22.1.34



RG Rajeshkannah G Syncfusion Team June 22, 2023 09:29 AM UTC

Hi Alessandro,


We have checked the reported issue with the NuGet version v21.2.10 and the latest NuGet v22.1.34 and we are unable to reproduce the issue at our end. Meanwhile, we have prepared sample and video for you reference. Please refer the sample and video in attachments.


If the problem persists, please reproduce it in the provided sample and revert to us (or) send your sample that replicates the problem. This would allow us to investigate the reported problem at our end and provide a solution as soon as possible. 


With regards,

Rajeshkannah Gopalakrishnan


Attachment: Pivot_Table_bcbc756d.zip


AG Alessandro Giri replied to Rajeshkannah G June 23, 2023 08:17 AM UTC

CascadingParameter ISyncfusionStringLocalizer is not passed to Pivot. 

I reproduced the error in attached example. I also attached a screen.

"GetText" is a method of  ISyncfusionStringLocalizer.


    // An interface for processing the Syncfusion UI component's Localization.

    public interface ISyncfusionStringLocalizer

    {

        // ResourceManager for processing the resource file parsing.

        ResourceManager ResourceManager { get; }


        // Return the Localized value from the resource file.

        // Parametri:

        // Key string to get the localized value.

        // Returns the localized string.

        string GetText(string key);

    }


Attachment: PivotBlazorApp_6d01fa7b.zip


AG Alessandro Giri June 23, 2023 08:18 AM UTC

Screen with error


Attachment: immagine_d9c1f768.zip


RG Rajeshkannah G Syncfusion Team June 23, 2023 01:03 PM UTC

Hi Alessandro,


We are unable to reproduce the issue in the latest NuGet version v22.1.34. Meanwhile, we have configured the Syncfusion Localizer and modified the Blazor project for your reference.  Please find it in the attachments.


Output Screenshot




To know more about Localization of Syncfusion Blazor Components, refer the UG document below.


Document: https://blazor.syncfusion.com/documentation/common/localization#localization-of-syncfusion-blazor-components


Please let us know if you have any queries.


With regards,

Rajeshkannah Gopalakrishnan.


Attachment: PivotBlazorApp_97bfcf73.zip

Loader.
Up arrow icon