bool SetDataAreaGridMetaData(string mon, DataAreaGrid tArg)
mon. Moniker of the Table visualizer.
tArg. Parameters of the Table visualizer that should be set.
The SetDataAreaGridMetaData operation changes metadata of the Table visualizer.
The operation is used to work with the Table visualizer that displays data of analytical data area.
To execute the operation, in the mon field specify regular report instance moniker with the !DataArea!DataSources!'source key'!DataSourceSlices!'slice key'!Views!'table key' postfix, and in the tArg field specify values to be changed. The moniker can be obtained on executing the OpenPrxMeta operation.
The operation returns True if changes are applied successfully.
Below is the example of enabling sorting in table. The request contains table moniker and the fields that determine whether sorting should be enabled. The response contains whether sorting is successfully enabled.
{
"SetDataAreaGridMetaData" :
{
"mon" : "S1!M!S!P1!DataArea!DataSources!1!DataSourceSlices!1!Views!4",
"tArg" :
{
"displayLeftHeaderSortIcons" : "true",
"displayTopHeaderSortIcons" : "true"
}
}
}
{
"SetDataAreaGridMetaDataResult" : "1"
}
public static bool SetDataAreaGridMetaData(string moniker, uint sourceKey, uint sliceKey, uint viewKey)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetDataAreaGridMetaData()
{
tArg = new DataAreaGrid()
{
viewSettings = new EaxGridViewSettings()
{
leftSettings = new EaxGridHeaderSettings()
{
displaySortIcons = true,
},
topSettings = new EaxGridHeaderSettings()
{
displaySortIcons = true
}
}
},
mon = moniker + "!DataArea!DataSources!" + sourceKey.ToString() + "!DataSourceSlices!" + sliceKey.ToString() + "!Views!" + viewKey.ToString()
};
//Change table metadata
var result = somClient.SetDataAreaGridMetaData(tSet);
return result;
}
See also: