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. Image for the cookie policy date

Using CustomAdaptor with dependency injection

Hello,
I'm trying to use the Grid control with Blazor in our existing application.

We have already a DAL that uses DI pattern with services and so on. I'm trying to implement server side pagination with our own CustomAdaptor and the existing services but the problem is that Adaptors.CustomAdaptor wants a parameter-less constructor and we can't pass anything.

How can I approach this scenario?

11 Replies

VN Vignesh Natarajan Syncfusion Team October 16, 2019 04:39 AM

Hi Pierpaolo,  

Greetings from Syncfusion support.  

Query: “ I'm trying to implement server side pagination with our own CustomAdaptor and the existing services 

Currently we do not have support to achieve your requirement. But since it is a known requirement, we have considered it as an improvement. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We have planned this feature for our 2019 Volume 3 Service pack release (Bi-Weekly Nuget release) which is expected to be rolled out on or before 31st October 2019. We will let you know when this feature is implemented. 
 
You can track the current status of this feature request and also communicate with us regarding the open features any time using our Feature Report page. 
 
 
Till then we appreciate your patience. 
 
Regards, 
Vignesh Natarajan.


YZ Yaroslav Zhmayev replied to Vignesh Natarajan October 16, 2019 04:49 AM

Hi Pierpaolo,  

Greetings from Syncfusion support.  

Query: “ I'm trying to implement server side pagination with our own CustomAdaptor and the existing services 

Currently we do not have support to achieve your requirement. But since it is a known requirement, we have considered it as an improvement. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We have planned this feature for our 2019 Volume 3 Service pack release (Bi-Weekly Nuget release) which is expected to be rolled out on or before 31st October 2019. We will let you know when this feature is implemented. 
 
You can track the current status of this feature request and also communicate with us regarding the open features any time using our Feature Report page. 
 
 
Till then we appreciate your patience. 
 
Regards, 
Vignesh Natarajan.

Our company is evaluating your Blazor UI toolkit and having DI working with custom adapters is a must, please hurry up ))


VN Vignesh Natarajan Syncfusion Team October 17, 2019 12:19 AM

Hi Yaroslav,  

Thanks for your interest with Syncfusion product. 

Query: “Our company is evaluating your Blazor UI toolkit and having DI working with custom adapters is a must 

Previously we have considered this feature for our 2019 Volume 4 release which is expected to be rolled out in the month of December 2019. But considering the heavy feature request for this requirement, we have preponed the feature to our next Bi-Weekly Nuget release which will be rolled out on or before October 31st 2019.     

We will get back to you once our Bi-Weekly Nuget release gets successfully rolls out. Till then we appreciate your patience. 

Regards,
Vignesh Natarajan.



MO Micah Osborne October 18, 2019 01:17 PM

You could simple allow us to set the adaptor instance directly.

EjsDataManager Adaptor=@MyAdapterInstance  /EjsDataManager

@code {
      [Inject] public MyCustomAdaptor MyAdapterInstance {get ;set; }
}

I have the same issue as the guy above, i want to use syncfusion but this is a deal breaker.  I have to be able to set the datamanager adaptor directly


VN Vignesh Natarajan Syncfusion Team October 21, 2019 06:35 AM

Hi Micah,  

Thanks for your suggestion.  

Query:” You could simple allow us to set the adaptor instance directly. 

Instead of setting the adaptor instance, we have planned to implement the CustomAdaptor extending from OwningComponentBase. So that CustomAdaptor will be separate sub component of EjsDataManager (refer the below code example) instead of default AdaptorInstance. Once implemented you can pass parameters along with adaptor instance. 

<EjsDataManager> 
    <MyCustomAdaptor></MyCustomAdaptor> 
</EjsDataManager> 
      
We have considered this requirement for our upcoming Bi-Weekly Nuget release which is expected to be roll out on or before 31st October 2019. We appreciate your patience until then. 

Regards, 
Vignesh Natarajan. 



YZ Yaroslav Zhmayev October 23, 2019 09:33 AM

So are you going to use ActivatorUtilities.CreateInstance in order to enable DI for customer adapters?


VN Vignesh Natarajan Syncfusion Team October 24, 2019 01:37 AM

Hi Yaroslav,  

Query: “So are you going to use ActivatorUtilities.CreateInstance in order to enable DI for customer adapters? 

No, we will not be creating any instance for the Dependency Injection. Custom adaptor will be provided as a Blazor component and the framework will create instance for them. The custom adaptor component will be extended from OwningComponentBase to make use of the services inside custom adaptor component as explained in below documentation. 


We will get back to you once this requirement is rolled out successfully.   

Regards, 
Vignesh Natarajan. 



PI Pierpaolo November 7, 2019 03:30 AM

Hello,
is there any news regarding the update?


VN Vignesh Natarajan Syncfusion Team November 8, 2019 02:36 AM

Hi Pier, 

We regret for the inconvenience caused.  

Query: “is there any news regarding the update? 

Due to some unforeseen circumstances, we are not able to include the fix for this improvementsupport to inherit the dataadaptor  from owingcomponentbase in our last Nuget (17.3.0.26-beta) release. But we this requirement will be included in our subsequent bi-weekly Nuget release which is expected to be rolled out on or before 15th November 2019.  

Until then we appreciate your patience. 

Regards, 
Vignesh Natarajan. 



YZ Yaroslav Zhmayev November 25, 2019 07:32 AM

Hello, has this feature been already implemented?


VN Vignesh Natarajan Syncfusion Team November 26, 2019 01:09 AM

Hi Yaroslav,   
 
Query: “has this feature been already implemented? 
 
Yes, we have implemented this feature Support to inherit dataadaptor from owingcomponentbase and to use dependency injection in our last release (17.3.0.27-beta) release. And we also have migrated our Components to .Net Core 3.1 Preview 2 in that release. Please find the Nuget package and also the release notes regarding the fixes we have included in this release from below.   
  
  
  
Kindly ensure that you have referred the latest version script and css as below   
  
  <link rel='nofollow' rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.3.27/fabric.css" rel="stylesheet" />  
    <script src="https://cdn.syncfusion.com/ej2/17.3.27/dist/ej2.min.js"></script>  
  
  
Kindly refer our UG documentation for your reference   
  
  
Please get back to us if you have further queries.  
  
Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon