Hi,
I moved us project from blazor wasm to server.
We use devexpress datagrid for some pages => https://demos.devexpress.com/blazor/BindGridtoData#CustomData
For implement server side paging, sort, group by, summary we use https://github.com/DevExpress/DevExtreme.AspNet.Data as devex suggested
Basically DevExtreme.AspNet.Data manipulate IQueryable object by input object (take,skip,where,select,group by etc..)
To provide that, my api have DataSourceLoadOptionsBase input object => https://github.com/DevExpress/DevExtreme.AspNet.Data/blob/master/net/DevExtreme.AspNet.Data/DataSourceLoadOptionsBase.cs
you can see in the example https://docs.devexpress.com/Blazor/DevExpress.Blazor.DataSourceLoadOptionsExtensions.ConvertToGetRequestUri%28DevExtreme.AspNet.Data.DataSourceLoadOptionsBase-System.String%29#remarks
using var response = await Client.GetAsync(options.ConvertToGetRequestUri(dataEndpointUri), cancellationToken);
options type is DataSourceLoadOptionsBase, extension method convert it GetRequestUri format.
But i can not intervene dynamic http proxy system before send request to api.. because of that i call api with http client manual way. You can see example below from devex
protected async Task<LoadResult> LoadCustomData(string dataEndpointUri, DataSourceLoadOptionsBase options, CancellationToken cancellationToken) {
using var response = await Client.GetAsync(options.ConvertToGetRequestUri(dataEndpointUri), cancellationToken);
response.EnsureSuccessStatusCode();
using var responseStream = await response.Content.ReadAsStreamAsync();
return await JsonSerializer.DeserializeAsync<LoadResult>(responseStream, cancellationToken: cancellationToken);
}
Hi @maliming how get i get token from blazor server ? IAccessTokenProvider not avaible there
https://support.abp.io/QA/Questions/1222/Call-Api-Without-Dynamic-Proxy-Client-From-Blazor-Wasm--Http-Dynamic-Proxy-Error#answer-70a9566f-d304-2aba-52a4-39fc1df27abd
https://support.abp.io/QA/Questions/1233/ABP-Suite-does-not-generate-Blazor-UI-for-a-module
We are also waiting
Hi @yekalkan , suite (module template) not create blazor server host project.
Thanks @maliming its worked, by the way IHttpClientProxy could share current httpclient object to us (ready to use) if we need call custom api.. i need set base url and auth
Hi, how can i get current user bearer token to call remote api without using dynamic proxy client. Can you provide full example with HttpClient object
I try to get options from IHttpClientProxy but its just have service info. I wish we could get ready to use HttpClient object for make custom call..
I try to implement devexpress DataGrid CustomData option. Its provide to call api with paging,sorting,group by,summary.. options. And it can modify IQuarable object by your input object (await DataSourceLoader.LoadAsync(query, input))
For that you have to create method with special signature (how devex DataGrid like) async Task<LoadResult> GetData(DataSourceLoadOptionsBase options, CancellationToken cancellationToken) But dynamic proxy couldnt serialize DataSourceLoadOptionsBase object why i dont know, already devex have helper method for that options.ConvertToGetRequestUri("http://apiurl")
abp suite v4.3 not create module host project for blazor server
Hi,
When i create module template with suite, in host folder for Blazor.Server host project not created and preconfigured will you add that next release?as I remember this is fixed in the next version
on rc-2 not work