Sir I use vwp
I have one table that four field
Item
Rate
Qty
Amount
Sir for add new record I use this code that run fine
try {
RowKey rk1 = transDataProvider.appendRow();
transDataProvider.setCursorRow(rk1);
} catch (Exception ex) {
log("Error Description", ex);
error(ex.getMessage());
}
Q. 1. Sir I want to give only
Item,qty and rate and table calculate amount automatic and show in next field
Q. 2. I want to get current row id of table for give data to textfield
My use click on record that pass data to textfield
I use this code but that not give me current record id
try {
RowKey rk = tableRowGroup1.getRowKey();
if (rk != null) {
textField1.setValue(transDataProvider.getValue("trans.item", rk));
textField2.setValue(transDataProvider.getValue("trans.qty", rk));
textField3.setValue(transDataProvider.getValue("trans.rate", rk));
textField4.setValue(transDataProvider.getValue("trans.amoumt", rk));
} catch (Exception ex) {
log("ErrorDescription", ex);
error(ex.getMessage());
}
But sir this code not give me result
Q.3. sir I want to remove record
My click record and press button for remove
For remove I use this code
try {
RowKey rk = tableRowGroup1.getRowKey();
if (rk != null) {
transDataProvider.removeRow(rk);
transDataProvider.commitChanges();
transDataProvider.refresh();}
} catch (Exception ex) {
log("ErrorDescription", ex);
error(ex.getMessage());
}
But this code not remove record
Please give me idea how I down this all work