ComponentOne ReportViewer for ASP.NET AJAX: ReportViewer for ASP.NET AJAX Task-Based Help > Resizing the Control

Resizing the Control

You can easily change the height and width on the C1ReportViewer by setting the Height and Width properties. You can easily change the control's height and width in Design view, Source view, the Properties window, or code.

In Design View

To resize the C1ReportViewer control in Design view, click the bottom-right corner of the control and perform a drag-and-drop operation to set the control's size.

In Source View

In Source view add Height="350px" Width="600px" (or substitute values you choose) in the <cc1:C1ReportViewer> tag so that it looks similar to the following:

<cc1:C1ReportViewer ID="C1ReportViewer1" runat="server" Height="350px" Width="600px" >

The above will resize the control to 350 pixels tall and 600 pixels wide.

In the Properties Window

You can change the Height and Width properties to set the control's height and width in the Properties window:

1.   Click on the C1ReportViewer to select it.

2.   Navigate to the Properties window and if needed expand the Layout node to locate the Height and Width properties.

3.   Next to Height, enter the size you want the control's height to be, for example "350px".

4.   Next to Width, replace "600px" with the size you want the control's width to be, for example "600px".

5.   Press the ENTER key or click outside of the Properties window for the height and width you set to be applied to the C1ReportViewer control.

In Code

Add the following code to the Page_Load event to set the Height to 350 pixels and the Width to 600 pixels:

      Visual Basic

Me.C1ReportViewer1.Height = 350

Me.C1ReportViewer1.Width = 600

      C#

this.C1ReportViewer1.Height = 350;

this.C1ReportViewer1.Width = 600;


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.