To add Telerik RadDock to an ASP.NET WebForm you can use either of the following approaches:
If you intend to use skins different from the default or if you plan to modify the JavaScript files, you also need to manually copy the Dock subfolder under the RadControls folder from the Telerik RadDock installation folder to the root folder of your web application.
 |
Because of the specific control features, you will always need to copy RadControls for Telerik RadChart, Telerik RadEditor, Telerik RadSpell and Telerik RadWindow products. |
 |
If your RadControls folder contains multiple subfolders for Telerik controls - for example, if you are using a Telerik RadControls for ASP.NET installation as opposed to a Telerik RadDock installation - make sure you copy only the subfolders of the controls you are going to use (Dock and any other controls you need). Do not copy the subfolders of controls you are not planning to use as this may cause a number of compilation errors: Visual Studio 2005 compiles all files in the web project; errors occur when missing assemblies are not found. |
Adding Telerik RadDock to a WebForm using Visual Studio .Net
The easiest way to deploy Telerik RadDock is by dragging its icon from the Visual Studio .NET Toolbox in Design mode. Visual Studio will automatically copy the RadDock.NET2.dll to the bin folder of your web-application and will create the respective references. You only have to copy the RadControls folder to the root folder of your web application as explained above.
Adding Telerik RadDock to a WebForm manually
If you are not using Visual Studio .NET, you can deploy Telerik RadDock manually. Follow the instructions below:
- Copy the RadControls folder from the Telerik RadDock installation folder to the folder of your web application.
-
Copy the RadDock.NET2.dll from the bin folder of the Telerik RadDock installation to the bin folder of your web application.
-
Open your aspx/ascx file and add the Telerik RadDock Register directive at the top:
<%@ Register TagPrefix="rad" Namespace="Telerik.WebControls" Assembly="RadDock.Net2" %>
If you plan all pages in your application to use Telerik RadDock you can add the following lines in your web.config file. In this case you don't need to add this directive in your pages.
| |
Copy Code |
|
<pages> <controls> <add tagPrefix="rad" namespace="Telerik.WebControls" assembly="RadDock.Net2" /> </controls> </pages> |
-
Write the Telerik RadDock tags in the body of the WebForm:
| |
Copy Code |
|
<rad:RadDock ID="dock1" Runat="server"> </rad:RadDock> |
- Add any additional properties you need between the Telerik RadDock tags.
Troubleshooting: the css styles do not apply correctly
If you have a Telerik control in a user control with output caching turned on you should manually register all the required CSS files in the head tag of your page. Otherwise the control will not be displayed correctly. The easiest way to do this is through a LINK element:
|
<link href="~/RadControls/Dock/Skins/[SkinName]/styles.css"rel="stylesheet"runat="server"> |