Promotic

LoadFromString - method of the PmaDataTable object

Description:
Assignment of selected table values from the text value (of the String type).
Syntax:
Long LoadFromString(String sType, Variant index, String sString)
Parameters:
sType(String) Range of selected values in the table:
"Row" - One row of the table is selected. The index value must be an integer:
- index>=0 means the index of the selected row (zero-based index).
- index=-2 means the last row.
"Col" - One column of the table is selected. The index value must be of the String type or of the Integer type:
- If it is of the String type, then it is the column name.
- If it is of the Integer type, then index>=0 means the index of the selected column (zero-based index), index=-2 means the last column.
index(Variant) Index into the table whose meaning is defined by the sType parameter
sString(String) String value created for example by the PmaDataTable.SaveToString method.
Return value:
Returns the number of set items.
Note:
For the form of the text value see description of the PmaData.SaveToString method.
 
"Read only" columns: Each cell is empty at the beginning. The cell is considered empty also if it contains numeric value 0 or an empty string "". New value can be written into such cell. After writing a non-zero value into the "Read only" column the cell is "locked". "Locked cell" becomes a constant and cannot be written again. Other still "unlocked" cells can be written into as needed. Methods that write into multiple cells simultaneously will write the values only into "unlocked cells" while the content of "locked" cells remains unchanged.
See also:
Example:
The last row in the table is set by the content of the sString variable
JavaScriptVBScriptSelect and copy to clipboard

var oDataTable = pMe.Pm("/DataTable");
var sString = "1;3;5";
oDataTable.LoadFromString("Row", -2, sString);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.