Symbol in display

Dear Experts
I have 2 doubts with display

  1. I have a trend window symbol
  • How can get its properties as: Name of columns, count of row, count of column, value of each cell
  1. I have a combobox symbol
  • I can declare it in code behind, but I don’t know how to using its event properties. I want to type code inside its event properties.
    Please help me
    Best

Hi Manh,

  1. In what table exactly do you want to get this informations from? Can you please send us a print screen?

As you know, we also have informations about the DataGrid in the following link:

  1. You can declare it in CodeBehind like this, then you can use the method you want, what code do you want to type inside the property, can you please provide us an example?

Bests,
Tatsoft Team.

Dear expert
Thanks for your feed back.

  1. Alarm window object was shown in Runtime mode like a table ( contain columns and rows)
    How can I get value a specific cell in window object. Please see picture


2. The picture of post is mine. As I mentioned, I could declare TcomboBox in code behind.
I could also use its method and properties inside public void.
But I don’t know how you the its event.
Best

Hi Manh,

  1. To acquire information about an AlarmWindow, the same method applied to DataGrids can be used:

For column names, number of columns and number of rows:

image1

For the value of a specific cell:

In this case, @Tag.text will get the value of cell(0,20).
Keep in mind that the column index used in “columnSelect”, is according to the AlarmWindow Configuration page.

  1. The ComboBox object works as a “class” in C#, its events are represented by the lightning symbol:

image3

If you want to handle ComboBox events, you have to associate an event handling method with the event.
In this example below, we are associating the “SelectionChanged” event with its handler:

image4

Then you have to write the code you want to be executed when the event occurs:

image5

Bests,
Tatsoft Team.

Dear expert
Thank for your useful feedback. I got your explanation.
I have a small doubt when declare ComboBox with instruction " TComboBox Combo = CurrentDisplay.GetControl(“cobox”) as TComboBox"*
If I put this instruction inside the public void method, no error happen.
If I put this instruction outside the public void method, the error happen like below pictue


Best.

Hi Manh,

In the following explanation we will show you how to create a global ComboBox declaration. We will declare the variable Combo and Combo2 as of type TComboBox. The function InitializeCombo is then created, which aims to initialize the variable Combo and Combo2. In DisplayIsOpening, the function called InitializeCombo is executed to initialize the Combo and Combo2 variables and we did this example adding the values “123” and “abc”. In this way, the values are already inserted in the ComboBox.

public TComboBox Combo;
public TComboBox Combo2;

public void InitializeCombo()
{
    Combo = CurrentDisplay.GetControl("cobox") as TComboBox;
}

public void InitializeCombo2()
{
    Combo2 = CurrentDisplay.GetControl("Combo") as TComboBox;
}


public void DisplayOpening()
{
	InitializeCombo();
	Combo.Items.Add("abc");     
	InitializeCombo2();
        Combo2.Items.Add("123");

}

Outside of methods , you can only declare variables, to execute the GetControl() must be into a methods DisplayOpening, DispayIsOpen, DisplayClosing or any other methods called by those three methods.

Bests,
Tatsoft Team.