GetDataGridColumnsResult GetDataGridColumns(OdId tOb)
tOb. Moniker of the relational data source, which the table is set up to work with.
The GetDataGridColumns operation gets a list of columns that can be displayed in the table.
The table based on a relational data source is used in the DataGridView information panel visualizer. To execute the operation, in the tOb field specify moniker of the relational data source, which the table will be set up to work with. The object moniker can be obtained on executing the GetObjects operation.
The operation results in the collection of column names and identifiers.
Below is the example of getting the list of columns that can be displayed in the table. The request contains moniker of the relational data source in the repository. The response contains the list of obtained columns.
The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier article.
{
"GetDataGridColumns" :
{
"tOb" :
{
"id" : "GKGLPALJEFMIGOAELJBFJLDABBEPHNDEMLLNDEFNJLCIOEOI!M!7466"
}
}
}
{
"GetDataGridColumnsResult" :
{
"fields" :
{
"Item" :
[
{
"name" : "ORDER",
"id" : "ORDER"
},
{
"name" : "city_name",
"id" : "city_name"
},
{
"name" : "region",
"id" : "region"
},
{
"name" : "federal_region",
"id" : "federal_region"
},
{
"name" : "population",
"id" : "population"
},
{
"name" : "year_foundation",
"id" : "year_foundation"
},
{
"name" : "year_city_status",
"id" : "year_city_status"
},
{
"name" : "old_city_name",
"id" : "old_city_name"
},
{
"name" : "emblem",
"id" : "emblem"
}
]
}
}
}
public static GetDataGridColumnsResult GetDataGridColumns(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetDataGridColumns()
{
tOb = new OdId() { id = mb.id + "!" + FindObjectById(mb, id).k }
};
// Get the list of columns that can be displayed in the table based on a relational data source
var result = somClient.GetDataGridColumns(tGet);
return result;
}
See also: