Skip to content

Commit

Permalink
Rename table to a more specific name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpung committed Oct 14, 2023
1 parent 80b0456 commit 0c6d291
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p>Disposal calculation summary</p>

<SfGrid ID="ResultGrid" @ref="resultGrid" DataSource="@tradeCalculationResult.GetDisposals"
<SfGrid ID="DisposalCalculationGrid" @ref="disposalCalculationGrid" DataSource="@tradeCalculationResult.GetDisposals"
AllowPaging="true" AllowSorting="true" AllowPdfExport="true" AllowExcelExport="true" AllowResizing="true"
Toolbar="@(new List<string>() { "PdfExport", "ExcelExport", "Print" })" Height="1000px">
<GridPageSettings PageSizes="true"></GridPageSettings>
Expand Down Expand Up @@ -43,17 +43,17 @@
</SfGrid>

@code {
private SfGrid<ITradeTaxCalculation> resultGrid = new();
private SfGrid<ITradeTaxCalculation> disposalCalculationGrid = new();

public async Task ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
{
if (args.Item.Id == "ResultGrid_pdfexport") //Id is combination of Grid's ID and itemname
{
await this.resultGrid.ExportToPdfAsync();
await disposalCalculationGrid.ExportToPdfAsync();
}
if (args.Item.Id == "ResultGrid_excelexport") //Id is combination of Grid's ID and itemname
{
await this.resultGrid.ExportToExcelAsync();
await disposalCalculationGrid.ExportToExcelAsync();
}
}
}

0 comments on commit 0c6d291

Please sign in to comment.