Closed dazinator closed 4 years ago
Hi @dazinator
Ad 1) You implement ILazyDataSetLoader<TItem>
only when you have some special scenarios. You also must this service register into the DI container after FlexGrid when you want to use it. Default behavior is implemented with HttpLazyDataSetLoader
which makes Http calls with adresses provided by LazyLoadingOptions
configuration object. So basically you can use this.
Ad 2) For those scenarios you can use UseAuthorizationForHttpRequests
options for FLexGrid when you setup in DI container. After that you must create service which implemets IAuthorizationService
interface and the Bearer token will be provided in every request see AuthorizationHttpClientFactory
also you can create your own factory by implementig interface IHttpClientFactory
I hope that answers will help you!
Thank you, I'll give that a go! Cheers
Hello, I'm working on a blazor wasm (client side) project. I would like a lazy loaded grid. From one of the samples, it looks like you implement an
ILazyDataSetLoader<TItem>
and in there you return data from memory. I assume if I want to fetch data from a backend api, I need to implement anILazyDataSetLoader<TItem>
that makes Http calls to the backend to fetch the data. However then I got confused because I then saw this which seemed much less effort:Some questions:
When to implement
ILazyDataSetLoader<TItem>
versus just supplyingLazyLoadingOptions
with uri's as above?My http calls to backend api will need have a JWT token appended in header. How best to take control / supply the HttpClient that the grid view will use when making calls via the LazyLoadingOptions approach above?