We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Syncfusion.EJ2.Blazor 17.4.0.39

Thread ID:

Created:

Updated:

Platform:

Replies:

150021 Dec 18,2019 07:21 AM UTC Dec 18,2019 12:55 PM UTC Blazor 3
loading
Tags: Grid
Costa
Asked On December 18, 2019 07:25 AM UTC

Hi.After installing the package Nuget "Syncfusion.EJ2.Blazor 17.4.0.39" an error has occurred:
InvalidOperationException: Cannot provide a value for property 'SyncfusionService' on type 'Syncfusion.EJ2.Blazor.Grids.EjsGrid`1[[PTS.Models.Movie, PTS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. There is no registered service of type 'Syncfusion.EJ2.Blazor.SyncfusionBlazorService'.

I use Custom DataAdaptor:

    // Implementing custom adaptor by extending the DataAdaptor class
    public class MovieAdaptor : DataAdaptor
    {
        readonly ApplicationDbContext db;
        private readonly IMapper mapper;

....

Matthew
Replied On December 18, 2019 10:19 AM UTC

Hi Costa,

For the latest version, we need to add syncfusion blazor as a service in our startup.cs

Add the following using statement near the top of startup.cs

using Syncfusion.EJ2.Blazor;


Then in the ConfigureServices method add the following

services.AddSyncfusionBlazor();

Please can a Syncfusion dev confirm this -- I have done it and got it working, but still would be nice to have an official word.
Also, please can Syncfusion update the Getting Started documentation for Blazor to include this information.

HTH


Costa
Replied On December 18, 2019 11:08 AM UTC

Thank you, Matthew. The solution works.

Vignesh Natarajan [Syncfusion]
Replied On December 18, 2019 11:27 AM UTC

Hi Matthew / Costa, 

Thanks for contacting Syncfusion support.  

Query: “Please can a Syncfusion dev confirm this -- I have done it and got it working, but still would be nice to have an official word. 
 
Yes, from our latest release 2019 Volume 4 ( 17.4.0.39), we need to include the below highlighted line to ignore the Syncfusion service reference error while using the Syncfusion Products. 

Refer the below code example.   

[startup.cs] 

  public void ConfigureServices(IServiceCollection services) 
        { 
            services.AddRazorPages(); 
            services.AddServerSideBlazor(); 
            services.AddSingleton<WeatherForecastService>(); 
            services.AddSyncfusionBlazor(); 
       } 

Refer our UG documentation for your reference 



Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan.  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon