How to add selected rows from one dataTable to other..

Hi all,

I hv a dataTable containing some rows. when i click a button a new window appears containing other dataTable. Iam displaying data in a dataTable from an ArrayList. In the first column i hv placed checkboxes. If the user selects some rows by clicking on checkboxes, I hv to close the new window and add all the selected rows to the parent window dataTable. How to do that? any ideas?

Thanks...

[419 byte] By [JayKVa] at [2007-11-27 11:46:00]
# 1

for (RowObject rowObject : childDataList) {

if (rowObject.isSelected()) {

parentDataList.add(rowObject);

}

}

or so?

BalusCa at 2007-7-29 18:05:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

> for (RowObject rowObject : childDataList) {

>if (rowObject.isSelected()) {

>parentDataList.add(rowObject);

> }

> }

or so?

Thanks for ur reply.

What is RowObject here? How can i know that particular row is selected or not

When the check box is checked?

JayKVa at 2007-7-29 18:05:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

With RowObject I mean the DTO.

Go through http://balusc.xs4all.nl/srv/dev-jep-dat.html

BalusCa at 2007-7-29 18:05:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...