Some content on this site is available only to logged-in subscribers. Contact Us for information on becoming a subscriber.

InSource.Solutions | InSource Training | InSource Client Portal
InSource Solutions Logo
Log In Sign Up
InSource.Solutions InSource Training InSource Client Portal Log In Sign Up
  • Home
  • AVEVA Application Server
  • AVEVA Application Server Tech Notes

TN AppSvr173 How to use the Microsoft.net Datagridview control in Application Server

Last updated: February 28th, 2025

Description

  • Author: Michael Viteri
  • Published: February 28th, 2025

Details:

Description

How to use the Microsoft.net Datagridview control in Application Server

  • Author: Mike Viteri
  • Published: 11/12/2015
  • Applies to: Application 3.0 and greater

Details

You can start using the DataGridView Control from the Microsoft.net Framework. You have to import it into the Galaxy.

This can be done by inside the IDE going to Galaxy->Import->Client Control.

Then you have to browse to C:\Windows\Microsoft.NET\Framework\v4.0.30319 then import the system.windows.forms

then import the system.windows.forms

The Import will Start

Then finish

You will then see the import controls under the Graphic Toolbox

Create a new symbol in your graphic toolbox. We called our symbol testgrid in this example.

Open your new symbol and click on the embed Archestra Graphic button. Then from the Graphic Toolbox select "DataGridView".

This is what the embedded DataGridView will look like.

I have setup and deployed a user defined object called "datagridtest". It has three UDA's of CarMaker, CarColor and CarType. Each is an array with data below. We will use this data to populate the DataGridView.

Create an "OnShow' Archestra Graphic script that will populate the columns of the grid. It will be a three column grid.

dataGridView1.ColumnCount = 3;
dataGridView1.ColumnHeadersVisible = true;
dataGridView1.Columns[0].Name = "CarMaker";
dataGridView1.Columns[1].Name = "CarColor";
dataGridView1.Columns[2].Name = "CarType";

If you embed the symbol on an Intouch window and go to runtime. You will see this below.

Next add the script to read the row data from the datagridtest UDA's. This script adds a row of data when reading each UDA name and array.

datagridview1.Rows.Add(datagridtest.CarMaker[1],datagridtest.CarColor[1],datagridtest.CarType[1]);
datagridview1.Rows.Add(datagridtest.CarMaker[2],datagridtest.CarColor[2],datagridtest.CarType[2]);
datagridview1.Rows.Add(datagridtest.CarMaker[3],datagridtest.CarColor[3],datagridtest.CarType[3]);

Now if you go to runtime again on the DataGridView you should see the data that is being read of the object.

All functions of the DataGridView Control can be found here:

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview(v=vs.110).aspx

microsoft control application server
Give feedback about this article

Recommended articles

TN 1394 Error when Deploying: Remote Node's UserID/Password don't match GR Node's

Read More

TN 1366 Managing your Standalone InTouch Application in the Galaxy

Read More

Resolving "Open: Memory on the computer is low. New editor can't be launched."

Read More

TN 1040 No Alarms in Window Viewer

Read More
Support Icon

CONTACT SUPPORT

How to reach us

10800 Midlothian Turnpike Tpke, Suite 209, Richmond, VA 23235

1.877.INSOURCE

Technical Support - 1.888.691.3858

Contact Us

  • InSource Solutions
  • InSource Training
  • InSource Client Portal
  • Log In
InSource Solutions Logo

© 2025 InSource Solutions. All Rights Reserved.

Knowledge Base Software powered by Helpjuice

Expand