Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

Create a C# Addin which Contains an AVEVA Grid Control

Create a C# Addin which Contains an AVEVA Grid Control

  • Last UpdatedOct 28, 2024
  • 2 minute read

The supplied C# project is an example of a C# addin for use with AVEVA Plant/AVEVA Marine. The C# addin includes an AVEVA C# Grid Control and some other Visual Studio WinForms gadgets to demonstrate how the Grid Control can be used with AVEVA Plant/AVEVA Marine.

The addin creates the docked window shown below when run within the AVEVA Plant/AVEVA Marine Design module.

The example C# code collects all the Equipment items within the current project and lists them inside the grid along with attribute values for Name, Type, and Owner.

The data in the grid can be selected, sorted and filtered.

Note:
The following features of the example addin. These features make use of the published Grid Control API (see the section below entitled "AVEVA Grid Control API").

  1. The data in the grid can be exported to a Microsoft Excel file by entering a path name in the text box beneath the grid and by clicking on the "Export to Excel" button.

  2. The grid content can be previewed and printed by clicking on the "Print Preview" button.

  3. The color of the first row in the grid can be set either by choosing a color in the drop down list, or by typing a valid color into it.

  4. The number of selected rows in the grid is written to a read-only text box. Note that this feature makes use of an event on the grid. (See the section below entitled "Adding an event to the C# Grid Control").

  5. Notice that there are two different context menus available on the grid. One is available when equipment items are selected:

And the other menu is available from the header bar at the top of the grid:

Note:
That these menu options will only become available once you have made some modifications to the Design.uic file through menu customization. See below for instructions on how to do this.

TitleResults for “How to create a CRG?”Also Available in