ComponentOne GridView for ASP.NET AJAX: ComponentOne GridView for ASP.NET AJAX Overview > Adding the C1GridView Component to a Project

Adding the C1GridView Component to a Project

When you install ComponentOne Studio for ASP.NET AJAX, the Create a ComponentOne Visual Studio Toolbox Tab check box is checked, by default, in the installation wizard. When you open Visual Studio, you will notice a ComponentOne Studio for ASP.NET AJAX tab containing the ComponentOne controls has automatically been added to the Toolbox.

If you decide to uncheck the Create a ComponentOne Visual Studio Toolbox Tab check box during installation, you can manually add ComponentOne controls to the Toolbox at a later time.

ComponentOne GridView for ASP.NET AJAX provides the C1GridView control.C1GridView is the component used to generate a table of items that can be selected, edited, deleted and sorted.

To use C1GridView, add it to the form or add a reference to the C1.Web.UI.Controls.C1GridView assembly to your project.

Manually Adding a C1GridView Component to the Toolbox

To add C1GridView to the Visual Studio Toolbox:

1.   Open the Visual Studio IDE (Microsoft Development Environment). Make sure the Toolbox is visible (select Toolbox in the View menu, if necessary) and right-click it to open the Toolbox context menu.

2.   If you want the C1GridView component to appear on its own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, C1GridView, for example.

3.   Right-click the tab where the component is to appear and select Choose Items from the context menu. The Choose Toolbox Items dialog box opens.

4.   In the Choose Toolbox Items dialog box, select the .NET Framework Components tab. Sort the list by Namespace (click the Namespace column header) and check the check box for the component belonging to namespace C1.Web.UI.Controls.C1GridView.

Adding a C1GridView Component to the Form

To add C1GridView to a form:

1.   Add it to the Visual Studio Toolbox.

2.   Double-click the control or drag it onto your form.

Adding a Reference to the Assembly

To add a reference to the C1.Web.UI.Controls.C1GridView.2 assembly:

1.   Select the Add Reference option from the Project menu of your Web application project. This option is on the Website menu for Web site projects.

2.   Select the ComponentOne C1GridView assembly from the list on the .NET tab or browse to find the C1.Web.UI.Controls.2.dll (or C1.Web.UI.Controls.3.dll) file and click OK.

3.   Double-click the Default.aspx page to open the code window. At the top of the file, add the following Imports statement (using in C#):

Imports C1.Web.UI.Controls.C1GridView

Note: This makes the objects defined in the C1GridView assembly visible to the project. See Namespaces for more information.


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