Article Details
Id:20688
Product:finPOWER Connect
Type:NEW
Version:4.00.03
Opened:08/09/2023
Closed:08/09/2023
Released:27/09/2023
Job: J032005

HTML Widgets; Grid Control; AllowAddRows(value) function added

Previously, whether or not new rows could be added to a grid could only be configured when initialising a new Grid control using:

  C.gridTransactions = widget.UI.Grid("gridTransactions", {
    allowAddRows: true,
  });

Once initialised, this value could not be changed.

The grid control now has the AllowAddRows(value) function, which allows this option to be changed dynamically after the control is initialised. Additionally, specifying no value (i.e., AllowAddRows()) will return what the option is currently set to.

This function can be used like so:

C.gridTransactions.AllowAddRows(mRecord.CanANewRowBeAdded);

Or,

if (C.gridTransactions.AllowAddRows()) {
  // Do something
}