@page "/quotes"
\"Nicolas Alvarado\"
", type = "warning", showCancelButton = true, customClass = new { confirmButton = "btn btn-success m-1", cancelButton = "btn btn-danger m-1" }, buttonsStyling = false, confirmButtonText = "Yes", cancelButtonText = "No" }); if (result.TryGetProperty("isConfirmed", out var isConfirmedProperty) && isConfirmedProperty.GetBoolean()) { // Call your delete API here var response = await _services.DeleteQuotes(val); if (response == "success") { await JSRuntime.InvokeVoidAsync("Swal.fire", new { icon = "success", title = "Deleted!", text = "Data has been deleted.", type = "primary", showCancelButton = false, customClass = new { confirmButton = "btn btn-success", cancelButton = "btn btn-danger" }, buttonsStyling = false, confirmButtonText = "Ok" }); model = await _services.GetQuotesqueryable(); // await JSRuntime.InvokeVoidAsync("location.reload"); } else { await JSRuntime.InvokeVoidAsync("Swal.fire", new { title = "Not Deleted!", text = "Unsuccessful! Cannot delete this.", type = "danger" }); } } } async Task LoadData(LoadDataArgs args) { isLoading = true; await Task.Yield(); // This demo is using https://dynamic-linq.net var query = await _services.GetQuotesqueryable(); if (!string.IsNullOrEmpty(args.Filter)) { // Filter via the Where method query = query.Where(args.Filter); } if (!string.IsNullOrEmpty(args.OrderBy)) { // Sort via the OrderBy method query = query.OrderBy(args.OrderBy); } // Important!!! Make sure the Count property of RadzenDataGrid is set. count = query.Count(); // Perform paging via Skip and Take. model = query.Skip(args.Skip.Value).Take(args.Top.Value).ToList(); isLoading = false; ispdf = true; } public void Export(string type) { service.Export("Quotes", type, new Query() { OrderBy = grid.Query.OrderBy, Filter = grid.Query.Filter, Select = string.Join(",", grid.ColumnsCollection.Where(c => c.GetVisible() && !string.IsNullOrEmpty(c.Property)) .Select(c => c.Property.Contains(".") ? $"{c.Property} as {c.Property.Replace(".", "_")}" : c.Property)) }); } private async Task GeneratePdf(int qid) { eid = qid; ispdf = true; isloading = true; await Task.Delay(TimeSpan.FromSeconds(4)); var htmlContent = await JSRuntime.InvokeAsync