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
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
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.Name = "CarMaker";
dataGridView1.Columns.Name = "CarColor";
dataGridView1.Columns.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.
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: