13 years ago
Problem accessing cells of a tree table derived from an XtraTreeList
I've got a tree table (see appended screenshot) in which I want to access a certain cell to read it's value. The tree table class is derived from a Developer Express XtraTreeList. To access a cell I'm using the property wValue(row, col) of the tree list. There are two problems which I will try to explain as comprehensive as possible.
1. Obviously the data behind the tree table are stored statically, for example the value of for column "Name" is to be accessed using column index 0, the value for column "Wert" is to be accessed using column index 1, etc. For a complete sorted list of columns/properties for see below. If I enter the name of a column, wValue(0, "Wert"), the column name "Wert" is mapped to a column index. But this index refers to the position of the column as displayed. So if the column "Wert" is the third column displayed the call wValue(0, "Wert") will be coverted to wValue(0, 2) which would provide me with the value of column "Beschreibung". So basically I have to know which index to use to access a certain column/data field and can not use a string.
2. The other problem is that not all columns are displayed and with the index I can only access columns with an index up to the number of displayed columns. So only 3 columns, "Name", "Wert" and "M", are displayed. If I want to get the value in column "M" I would have to call wValue(0, 4), as described in 1. But because only 3 columns are visible I get the error "The control item 4 not found. Total number of itms: 3". Because I can not display all properties as columns it is not possible to access all properties.
My questions are:
Do I have to do something differently or is this a problem with TestComplete, DevExpress or the way we use the XtraTreeList in our code? If this is a problem not caused by my use of TestComplete: "hat ca I do about it? And if this is a problem caused by my use of TestComplete: What can I do abut it?
List of columns/propertiers for each row:
0 Name
1 Wert
2 Beschreibung
3 Datentyp <-- never visible as column to user
4 M
5 A
6 V
7 U
The class is derived from a Developer Express XtraTreeList (version 8.1.10). The derived class is added in the Object Mapping as a DevExpress XtraTreeList. We are using TestComplete verison 8.5. The Dev Experss Control Support Plugin v8.5 is installed.
1. Obviously the data behind the tree table are stored statically, for example the value of for column "Name" is to be accessed using column index 0, the value for column "Wert" is to be accessed using column index 1, etc. For a complete sorted list of columns/properties for see below. If I enter the name of a column, wValue(0, "Wert"), the column name "Wert" is mapped to a column index. But this index refers to the position of the column as displayed. So if the column "Wert" is the third column displayed the call wValue(0, "Wert") will be coverted to wValue(0, 2) which would provide me with the value of column "Beschreibung". So basically I have to know which index to use to access a certain column/data field and can not use a string.
2. The other problem is that not all columns are displayed and with the index I can only access columns with an index up to the number of displayed columns. So only 3 columns, "Name", "Wert" and "M", are displayed. If I want to get the value in column "M" I would have to call wValue(0, 4), as described in 1. But because only 3 columns are visible I get the error "The control item 4 not found. Total number of itms: 3". Because I can not display all properties as columns it is not possible to access all properties.
My questions are:
Do I have to do something differently or is this a problem with TestComplete, DevExpress or the way we use the XtraTreeList in our code? If this is a problem not caused by my use of TestComplete: "hat ca I do about it? And if this is a problem caused by my use of TestComplete: What can I do abut it?
List of columns/propertiers for each row:
0 Name
1 Wert
2 Beschreibung
3 Datentyp <-- never visible as column to user
4 M
5 A
6 V
7 U
The class is derived from a Developer Express XtraTreeList (version 8.1.10). The derived class is added in the Object Mapping as a DevExpress XtraTreeList. We are using TestComplete verison 8.5. The Dev Experss Control Support Plugin v8.5 is installed.