ChangeTabTableStyleByName

Syntax

bool ChangeTabTableStyleByName(TabSheetId tTabSheet, TabTableStyle tArg, string newName)

Parameters

tTabSheet. Table moniker.

tArg. Updated style settings to be applied.

newName. New name that will be set for a style.

Description

The ChangeTabTableStyleByName operation changes settings of a style with the specified name.

Comments

To execute the operation, in the tTabSheet field specify table moniker and in the tArg field specify updated style settings. The moniker can be based on the moniker of opened object instance, the table of which is worked with, following the rules:

Name of the changed style is specified in the tArg.Name field. If the style should be renamed, specify new name in the newName field.

The operation results in the logical True if the style was changed successfully.

Example

Below is the example of changing table style. The request contains moniker of the table, name of the changed style and new settings of alternating style. A new name is also set for the style. The response contains whether style are successfully changed.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ChangeTabTableStyleByName xmlns="http://www.fsight.ru/PP.SOM.Som">
<tTabSheet xmlns="">
  <id>JMHNJCPPENOAGOAEKKAIOMBCNHKFGLBECJGOILNNKEBNHDNH!M!S!POMEOEHPPENOAGOAEHHAFJNMHPFBDKBJEDIHOKONCJJDDJEHC!Sheets!1</id>
  </tTabSheet>
<tArg xmlns="">
  <Name>EAX table style</Name>
  <PredefinedStyle>DarkRed</PredefinedStyle>
  </tArg>
  <newName xmlns="">EAX table style(changed)</newName>
  </ChangeTabTableStyleByName>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <ChangeTabTableStyleByNameResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</ChangeTabTableStyleByNameResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"ChangeTabTableStyleByName" :
{
"tTabSheet" :
{
"id" : "JMHNJCPPENOAGOAEKKAIOMBCNHKFGLBECJGOILNNKEBNHDNH!M!S!POMEOEHPPENOAGOAEHHAFJNMHPFBDKBJEDIHOKONCJJDDJEHC!Sheets!1"
},
"tArg" :
{
"Name" : "EAX table style",
"PredefinedStyle" : "DarkRed"
},
"newName" : "EAX table style(changed)"
}
}

JSON response:

{
"ChangeTabTableStyleByNameResult" : "1"
}
public static bool ChangeTabTableStyleByName(string moniker, string sheetKey, string styleName)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tChange = new ChangeTabTableStyleByName()
{
tTabSheet = new TabSheetId() { id = moniker + "!Sheets!" + sheetKey },
tArg = new TabTableStyle()
{
Name = styleName,
PredefinedStyle = TabTablePredefinedStyle.DarkRed
},
newName = styleName + "(changed)"
};
// Change style
var result = somClient.ChangeTabTableStyleByName(tChange);
return result;
}

See also:

Table: Operations