Method GetDisplayValue
- Namespace
- Skyline.DataMiner.Core.DataMinerSystem.Common
- Assembly
- Skyline.DataMiner.Core.DataMinerSystem.Common.dll
GetDisplayValue(string)
Gets the displayed value of the cell that corresponds with the specified key.
[Obsolete("Use the overload with the additional KeyType argument instead.")]
string GetDisplayValue(string key)
Parameters
key
stringThe key of the row.
Returns
- string
The displayed value.
Examples
IDms myDms = protocol.GetDms();
IDmsElement element = myDms.GetElement(new DmsElementId(346, 100));
var table = element.GetTable(1000);
var column = table.GetColumn<double?>(1004);
string displayKey = "DK 1";
var displayValue = column.GetDisplayValue(displayKey);
Remarks
Typically used for parameters that provide a discrete entry mapping.
The key is assumed to be the display key. If no display key was found with the specified value, but a row exists with a primary key with the specified value, then the value of that row will be returned (only the case when the naming option or NamingFormat is in the protocol XML is used, not for the deprecated displayColumn attribute).
Do not use this call with primary keys in case the primary key value is also used as display key of another row.
This overload is deprecated. Use the overload with the additional KeyType argument instead.
Make sure the element on which you perform the operation is active. If it is stopped, a ElementNotFoundException will be thrown.
Exceptions
- ArgumentNullException
key
is null.- ArgumentException
key
is empty ("") or white space.- ElementNotFoundException
The element was not found in the DataMiner System.
- ParameterNotFoundException
The parameter was not found.
GetDisplayValue(string, KeyType)
Gets the displayed value of the cell that corresponds with the specified key.
string GetDisplayValue(string key, KeyType keyType)
Parameters
Returns
- string
The displayed value.
Examples
IDms myDms = protocol.GetDms();
IDmsElement element = myDms.GetElement(new DmsElementId(346, 100));
var table = element.GetTable(1000);
var column = table.GetColumn<double?>(1004);
string primaryKey = "PK 1";
var displayValue = column.GetDisplayValue(primaryKey, KeyType.PrimaryKey);
Remarks
Typically used for parameters that provide a discrete entry mapping.
Make sure the element on which you perform the operation is active. If it is stopped, a ElementNotFoundException will be thrown.
Exceptions
- ArgumentNullException
key
is null.- ArgumentException
key
is empty ("") or white space.- ElementNotFoundException
The element was not found in the DataMiner System.
- ParameterNotFoundException
The parameter was not found.