3.0 beta 2

Add new row in the table

i´d like to add a new line in the table. By pressing a button or else.

witch is the best way to do ?
August 18,
I have a solution for my Problem...
function new_row()
   obj.setRowProperty("count", obj.getRowProperty("count") + 1);
   myData[myData.length] = ["", "", ... ,""];
<a href="javascript:new_row()">New Row</a>

August 18,
There are many problem in suggested solution. Try sorting column before add/delete - grid will crash.

try seeing this example - http://thej2ee.com/awdemo/examples/myexamples/add_edit_delete_rows.html

here i've included everything required to do add/delete/edit. do check the function obj.resetRowValues(), which clears the internal variables used by grid...
Sudhaker Raj
August 20,
Sudhaker: Your example doesn't work on firefox and crashes after column sort in IE.
Any ideas?
August 30,
help me in this regard,

how can we identify a row or a element dynamically by clicking the row or the column of the row.
April 15,
This works for me: (I'm using a JavaScript array for the data, which are represented as strings)

// get selected row index
var rownum = obj.getSelectionProperty("index");

//get first element of selected row
var pkey = obj.getProperty("data/text", rownum, 0);
D. Cooke
April 15,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.