Version 1
Version 1

Auto Add Row

DataViewsJS enables you to add a new row to the grid at run time by using the allowAutoAddRow property. Auto add row feature helps you input new data quickly on the interface.

Use the following code to apply the allowAutoAddRow property.

Sample Code

These steps assume that you have already initialized the grid and defined the columns. See Creating a Basic Grid and Defining Columns for additional information.

Set the allowAutoAddRow property and initialize the grid using the DIV tag.

new GC.DataViews.GridLayout({
  allowAutoAddRow: true,

Note: You can also specify the location for the new row by setting the autoAddRowPosition property to top or bottom.

dataView.options.autoAddRowPosition = bottom; //Default is top

See also