Blazor Webassembly - Datagrid with RemoteSaveAdaptor - CRUD not working

Hello,

I am using Blazor Webassembly and working with DataGrid using RemoteSaveAdaptor. I want the sorting and filtering to be performed on the client side and only the CRUD operations to call the Web Api.

Unfortunately the Insert, Update and Remove Web APIs are not being called.

Could you please take a look? This is the code:

@page "/zonetaxi"
@inject HttpClient Http

<SfGrid TValue="Zona" AllowPaging="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" Width="700">
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Menu"></GridFilterSettings>
<GridPageSettings PageSize="15"></GridPageSettings>
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Dialog"></GridEditSettings>
<GridSelectionSettings PersistSelection="true" Type="SelectionType.Single"></GridSelectionSettings>
<SfDataManager Json="@Zone"
InsertUrl="http://185.104.180.42:8887/api/web/insert/zone"
UpdateUrl="http://185.104.180.42:8887/api/web/update/zone"
RemoveUrl="http://185.104.180.42:8887/api/web/delete/zone"
CrossDomain="true"
Adaptor="Syncfusion.Blazor.Adaptors.RemoteSaveAdaptor"
></SfDataManager>
<GridColumns>
<GridColumn Field="@nameof(Zona.ID)" HeaderText="Zona ID" Width="300" IsIdentity="true" IsPrimaryKey="true"></GridColumn>
<GridColumn Field="@nameof(Zona.Name)" HeaderText="Nume Zona" Width="250"></GridColumn>
</GridColumns>
<GridEvents TValue="Zona" OnActionFailure="Failure"></GridEvents>
</SfGrid>

@code {
public static List<Zona> Zone { get; set; }

protected override async Task OnInitializedAsync()
{
string responseText = await Http.GetStringAsync("http://185.104.180.42:8887/api/web/zone");
ResponseModel response = JsonConvert.DeserializeObject<ResponseModel>(responseText);
Zone = response.data;

base.OnInitialized();
}

private void Failure(FailureEventArgs e) {
Console.WriteLine(e.Error.Message);
Console.WriteLine(e.Error.StackTrace);
}

public class Zona
{
[JsonProperty("id")]
public int ID { get; set; }

[JsonProperty("name")]
public string Name { get; set; }
}

public class ResponseModel
{
public string err;
public List<Zona> data;
public int count;
}
}

1 Reply

RS Renjith Singh Rajendran Syncfusion Team February 17, 2022 02:12 PM UTC

Hi Marius, 
 
Greetings from Syncfusion support. 
 
Currently we don’t have support for RemoteSaveAdaptor in Blazor DataManager. We have logged a feature request task for this requirement “Provide RemoteSaveAdaptor support in Blazor. 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 vote count. This will be implemented in any of our upcoming releases.   
 
You can now track the current status of this feature request from the below feedback page.   
   
You can also communicate with us regarding the open features any time using our above feedback report page. Please find the list of available adaptors in SfDataManager from the documentation below, 
 
Regards, 
Renjith R 
 


Loader.
Up arrow icon