EjsGrid does not have a property matching the name '@ref:suppressField'

Using Syncfusion.EJ2.Blazor 17.3.0.29-beta and .NET Core 3.1.100, when I create an EjsGrid and want access to it in the code-behind, I am using the following that I found in this forum from a sample solution.

<EjsGrid DataSource="@MyData" @ref="@MyGrid" @ref:suppressField> ... </EjsGrid>

With this I get the error: EjsGrid ... does not have a property matching the name '@ref:suppressField'.

Is there another way to be able to access the EjsGrid from the code-behind?

Thanks.


1 Reply

VN Vignesh Natarajan Syncfusion Team December 9, 2019 09:09 AM UTC

Hi David,  

Greetings from Syncfusion support.  

Query: “With this I get the error: EjsGrid ... does not have a property matching the name '@ref:suppressField'. 
 
We understand that you are facing issue while using @ref:suppressField property in the EjsGrid. From .Net Core 3.0 Preview 9 release, Microsoft has suggested to remove the backing field property from component (refer below link). So kindly remove the @ref:suppressField property from EjsGrid to resolve the issue. 


To take the instance of EjsGrid in Code Behind, kindly define only @ref property alone.  Refer the below code example  

<EjsGrid @ref="DefaultGrid" ID="Grid" DataSource="@GridData"> 
. . . . . . . . .. . . .  
    </EjsGrid> 
 
@code{ 
    EjsGrid<OrdersDetails> DefaultGrid; 
. . . . . . . . . . 
    public class OrdersDetails 
    { 
        public int? OrderID { get; set; } 
. . . . . . . 
    } 
} 

Please get back to us if you have further queries.   

Regards, 
Vignesh Natarajan. 


Loader.
Up arrow icon