Wednesday, September 26, 2012

Getting of selected records

There is no such method, and 2.9 is no longer supported .... so,

var recIndices = myDT.getSelectedRows();
var recs = [];
for(var i=0; i  recs.push( myDT.getRecord(recIndices[i]) );

// leaves you with recs an Array of Records ....

// if you want a recordset of only the selected ones ... follow up with,

var newRS = new YAHOO.widget.RecordSet();
newRS.addRecords(recs); 


http://yuilibrary.com/forum/viewtopic.php?p=34368

No comments:

Post a Comment