@page "/User/UserList" @using Syncfusion.Blazor.Grids; @using Syncfusion.Blazor.Spinner; @using BlazorApp.Helper @using BWPMModels; @using BlazorApp.Controller;

UserList

@code { public List users { get; set; } public List usertypes { get; set; } protected override void OnInitialized() { users = BlazorApp.Controller.UserController.GetAllData(); usertypes = new List(); usertypes.Add(new usertypedata { usertype = 0, Typ = "Admin" }); usertypes.Add(new usertypedata { usertype = 1, Typ = "User" }); } private void OnBeginHandler(ActionEventArgs Args) { if (Args.RequestType == Syncfusion.Blazor.Grids.Action.Save) { if (Args.Action == "add") { var t = Args.Data; //returns the edited / insrted record details. //insert into your db } else { BlazorApp.Controller.UserController.savedata(Args.Data); //var t = Args.Data; } } } public class usertypedata { public int usertype { get; set; } public string Typ { get; set; } } }