Hi,
here the answers:
Whether you need custom component for CustomAdaptor
- yes
What you have to declare in OnInitialized
- The OnInitialized is just an example. Base on the inputs and changes the user do in the UI, I need to update the Queryable. And then I need to update the Scheduler or Grid based on the new Queryable.
Whether you need to load the appointments for the first scheduler in the counter page.
- yes
Share the issue details if you are facing any
You can find an example in my first post (counter.razor). Here I using a DataAdaptor as BlazorComponent because I need to pass the DataSource into the DataAdapter.
<SfDataManager Adaptor="Adaptors.CustomAdaptor">
<HQSchedulerAdaptorComponent Date="@CurrentDate" DataSource="@DataSource">HQSchedulerAdaptorComponent>
SfDataManager>
This is necessary because the DataSource is an Queryable which I generate via Linq-Expressions. But for this I need to inject the DbContext and the repositories.
For convenience only I don't do this in the example.
And the recommended way from you do not allow to inject in general, because the constructor need to be parameterless.
That is the reason why I inject everything in my blazor compoment (here the counter.razor), build the Queryable there and then pass it to the DataAdaptor.
Best regards