Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0db56ac

Browse filesBrowse files
Update methods-and-commands.md
1 parent a4c1442 commit 0db56ac
Copy full SHA for 0db56ac

File tree

Expand file treeCollapse file tree

1 file changed

+6
-23
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-23
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,21 @@
11
---
22
title: Methods and Commands
33
page_title: Methods and Commands of the Blazor Report Viewer
4-
description: "Learn about what are the methods and commands exposed by the Telerik Reporting Blazor Report Viewer and how to use them."
4+
description: "Learn about what the methods and commands exposed by the Telerik Reporting Blazor Report Viewer are and how to use them."
55
slug: telerikreporting/using-reports-in-applications/display-reports-in-applications/web-application/blazor-report-viewer/methods-and-commands
6-
tags: methods,and,commands,blazor,report,viewer
6+
tags: methods,commands,blazor,report,viewer
77
published: True
88
position: 3
99
previous_url: /blazor-report-viewer-methods-and-commands
1010
---
1111

1212
# Methods and Commands Overview
1313

14-
The Blazor Report Viewer exposes methods and commands that allow to control its behavior from application code.
14+
The Blazor Report Viewer exposes methods and commands that allow you to control its behavior from application code.
1515

16-
## Get a report viewer reference to access API
16+
## Get a report viewer reference to access the API
1717

18-
To call report viewer methods and execute commands it is required to first get a reference to the report viewer object using the `@ref` attribute. Then use the __reportViewer1__ object to access the report viewer API. For example, refresh and print of the current report can be triggered like this:
18+
To call report viewer methods and execute commands, it is required to first get a reference to the report viewer object using the `@ref` attribute. Then use the __reportViewer1__ object to access the report viewer API. For example, a refresh and print of the current report can be triggered like this:
1919

20-
````CSharp
21-
<button type="button" class="btn btn-light btn-sm" @onclick="RefreshReport">Refresh Report</button>
22-
<button type="button" class="btn btn-light btn-sm" @onclick="Print">Print Report</button>
23-
...
24-
<ReportViewer @ref="reportViewer1"
25-
...
26-
@code {
27-
ReportViewer reportViewer1;
28-
async void RefreshReport()
29-
{
30-
await reportViewer1.RefreshReportAsync();
31-
}
32-
async void Print()
33-
{
34-
await reportViewer1.Commands.Print.ExecuteAsync();
35-
}
36-
}
37-
````
20+
{{source=CodeSnippets\BlazorAppSnippets\Components\Pages\MethodsCommands.razor}}
3821

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.