:: Forum >>
Want to move all rows data from one grid to another grid.
I want to move all rows data from one grid to another grid onclick of button,
is there any functinality available for this?
how can i select all rows from grid??
we just have "gridobj.getCellText(text,col,row);" for cell text.
how to get all rows?
APP
Thursday, July 2, 2009
Anthony
Thursday, July 2, 2009
Yes, as Anthony said, this is the example you must take as reference.
Just need a few adjusts to make it work with "all rows selected".
PLS Note that I removed obj1.deleteRow(a[i]); which is causing interferences for multiple rows selection and replaced with a single obj1.setRowIndices([]); to clear souce grid-rows, but need a few extra lines if you need to completely clean the source grid.
Note2 : does NOT work in opposite direction. Adjust the function toSource() in same way if needed.
function toTarget(){
var a = obj1.getRowIndices();
for(i=0; i<a.length; i++){
obj2.addRow(a[i]);
}
obj1.setRowIndices([]);
obj2.setSelectedRows(a.concat());
obj1.setSelectedRows([]);
label.setControlText("Target: " + obj2.getRowIndices());
}
Carlos
Thursday, July 2, 2009
thanks. its working now.
APP
Friday, July 3, 2009
This topic is archived.
Back to support forum
Forum search