I am currently adding SfGrid and i have this kind of error

<SfGrid DataSource="@p" AllowPaging="true" Toolbar="@(new List<string>() { "Print" })">
                                <GridColumns>
                                    <GridColumn Field=@nameof(p.AIPDataModel.PPA) HeaderText="PPA" TextAlign="TextAlign.Right" Width="120"></GridColumn>
                                    <GridColumn Field=@nameof(p.AIPDataModel.Barangay) HeaderText="Barangay" Width="150"></GridColumn>
                                    <GridColumn Field=@nameof(p.AIPDataModel.Municipality) HeaderText="Municipality" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
                                    <GridColumn Field=@nameof(p.AIPDataModel.ImplementingOfficeOrAgency) HeaderText="Implementing Office/Agency" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
                                    <GridColumn Field=@nameof(p.AIPDataModel.ImplementingYear) HeaderText="Implementing Year" Width="150"></GridColumn>
                                </GridColumns>
</SfGrid>



and i have this error :

Error CS0411 The type arguments for method 'TypeInference.CreateSfGrid_8<TValue>(RenderTreeBuilder, int, int, IEnumerable<TValue>, int, bool, int, object, int, RenderFragment)' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Attachment: Screenshot_20210520_020907_d58eafb3.rar

1 Reply

VN Vignesh Natarajan Syncfusion Team May 20, 2021 04:49 AM UTC

Hi Leonardo,  

Thanks for contacting Syncfusion support.  

Query: “I am currently adding SfGrid and i have this kind of error” 

We have analyzed your query and we need some more details about the issue you are facing. So kindly share the following details to validate the reported issue.  

  1. Share the details the Grid datasource (about the variable p).
  2. Share the details about the model class (p).
  3. If possible share a simple issue reproducible sample
  4. Share more details about the issue you are facing.

Above requested details will be very helpful for us to validate the reported query at our end and provide solution as early as possible.  

Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon