Banana.Document.Column

Documentación •
En este artículo

The Banana.Document.Column class provide informations about a column.

The column's informations are described on the documentation page of dialog Columns setup, The column's informations are dependent of the view, therefore the same column can have a different headers depending on the view.

Example:

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var colHeader = tColumn.header;

This class was introduced in BananaPlus 10.1.7.23164.

Properties

alignment

Returns the column's alignment as string.

The returned string is one of:

  • left
  • center
  • right
var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var alignment = tColumn.alignment;

dataType

Returns the column's data type as string.

The returned string is one of:

  • text
  • number
  • amount
  • date
  • time
  • bool
  • timestamp
  • timecounter
  • links
  • textmultiline
  • xml
  • html
  • json
  • mime
  • markdowm
  • textencrypted
  • none
var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var dataType = tColumn.dataType;

decimal

Return the number of decimals for columns of type 'amount' of 'number'.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var decimals = tColumn.decimals;

description

Return the column's description.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var description = tColumn.description;

excludeFromPrinting

Return true if the column is to be excluded from printing, false otherwise.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var excludedFromPrinting = tColumn.excludedFromPrinting;

format

Return the column's format.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var format = tColumn.format;

header

Return the column's header.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var header = tColumn.header;

header2

Return the column's header 2.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var header2 = tColumn.header2;

style

Return the column's format as object with the properties 'fontSize' as integer, 'bold' as boolean and 'italic' as boolean.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var style = tColumn.style;
var fontSize = style.fontSize;
var isBold = style.bold;
var isItalic = style.italic;

visible

Return true if the column is visible, false otherwise.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var visible = tColumn.visible;

editable

Return true if the column is editable, false otherwise.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var editable= tColumn.editable;

This property was introduced in BananaPlus 10.1.20.

width

Return the column's width in millimeters.

var tColumn = Banana.document.table("Transactions").column("Description", "Base");
var width = tColumn.width;

Methods

No methods are defined for this class.

Tell us how we can help you better
If the information on this page is not what you're looking for, is not clear enough, or is not up-to-date, let us know.

Share this article: Twitter | Facebook | LinkedIn | Email