This is a migrated thread and some comments may be shown as answers.

WPF ReportViewer - hide toolbar

4 Answers 456 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Heiko
Top achievements
Rank 1
Iron
Veteran
Heiko asked on 26 Nov 2020, 09:48 AM

Hi,

I like to hide the built in toolbar of ReportViewer (WPF Core 3.1, Telerik Release 14.2.20.1021). First it does not fit in my UI design, second I do not need most of the buttons, they would only irritate my customer. What's the fastest way to do this?

Regards
Heiko

4 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 27 Nov 2020, 01:06 PM

Hello Heiko,

You can remove the toolbar easily by setting the following implicit style in your application:

<Window.Resources>
    <Style TargetType="telerik:RadToolBar" BasedOn="{StaticResource RadToolBarStyle}">
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>
</Window.Resources>

where the telerik namespace points to our schema:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

Please let me know whether this helps.

Regards,
Sia
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Heiko
Top achievements
Rank 1
Iron
Veteran
answered on 29 Nov 2020, 11:53 AM

Hello Sia,

yes, it helps, thank you. However, it would be much easier if there was a property like "ToolbarVisible" on the control. I made a feature request for it on the feedback portal, hope someone votes for this besides me. :-) What amazes me is that this property already exists in the ReportViewer for Webforms...

Regards
Heiko

0
Heiko
Top achievements
Rank 1
Iron
Veteran
answered on 30 Nov 2020, 09:16 AM

Hi, me again.

After I successfully made the toolbar invisible I had to find out that all commands of ReportViewer and the underlying ReportViewerModel like "MoveToNextPage" or "MoveToPreviousPage" are not public. (This is what I expected since most of the Telerik components offer this feature.)  So how can I implement my own buttons to perform these functions?

Regards
Heiko

0
Sia
Telerik team
answered on 02 Dec 2020, 04:23 PM

Hello,

Indeed, you are right that we have such ToolbarVisible property in some of the other report viewers so I am going to approve the feature request that you have already logged.

Regarding your second question, I can suggest you to use the exposed ReportViewer properties and  ReportViewer methods instead.

I hope this helps.

Regards,
Sia
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Heiko
Top achievements
Rank 1
Iron
Veteran
Answers by
Sia
Telerik team
Heiko
Top achievements
Rank 1
Iron
Veteran
Share this question
or