Banana.Document.Row

Documentation •
In this article

Banana.Document.Row is the interface of a row.

Properties

isEmpty

Return true if the row is completly empty.


var isEmpty = tRow.isEmpty;

rowNr

Return the index of the row.


var rowNr = tRow.rowNr;

style

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

var tRow = Banana.document.table("Transactions").row(10);
var style = tRow.style;
var fontSize = style.fontSize;
var isBold = style.bold;
var isItalic = style.italic;

This method was introduced in BananaPlus 10.0.12.088.

 

uniqueId

Return the unique id (an interger value) of the row.
Banana assign to every new row a unique id, this value is fix a will never change.


var uniqueId = tRow.uniqueId;

 

Methods

addMessage(msg [, columnName] [, idMsg])

Add the message msg to the document. The message is showed in the pane "Messages", and in a dialog if the application option "Show Messages" is turned on.

If idMsg is not empty, the help button calls an url with message's id (idMsg) as parameter.

If columnName is not empty, the message is connected to the column columnName. With a double click over message in the message pane, the cursor jump to the corresponding table, rowNr and columnName.

See also: Application.AddMessage, Table.AddMessageDocument.AddMessage.


var accountsTable = Banana.document.table("Accounts");        
var tRow = accountsTable.row(4);
tRow.addMessage("Message text");

toJSON([columnNames])

Return the row as JSON string. If the parameter columnNames is defined, only the columns in the array are included in the file.


// Return all the columns of the row
var json = tRow.toJSON();

// Return only the defined columns of the row
var json = tRow.toJSON(["Account", "Description", "Balance"]);

value(columnName)

Return the value in column columnName. If the column is not found or the object is invalid it return the value undefined.


var accountsTable = Banana.document.table("Accounts");        
var tRow = accountsTable.row(4);
tRow.value("Description");

Help us improve the documentation

We welcome feedback on how to improve this page.

Tell us what theme needs a better explanation or how to clarify a topic.

Share this article: Twitter | Facebook | LinkedIn | Email