.NET Customisation
User Guide
.NET Customisation
:
AVEVA C# Grid Control
: Create a C# Addin which Contains an AVEVA Grid Control
Create a C# Addin which Contains an AVEVA Grid Control
The supplied C# project is an example of a C# addin for use with AVEVA Plant/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/Marine.
The addin creates the docked window shown below when run within the AVEVA Plant/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 colour of the first row in the grid can be set either by choosing a colour in the drop down list, or by typing a valid colour 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 customisation. See below for instructions on how to do this.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.