0

Migrating from EXT 3.x(up to v3.4) to YUI 2.x(up to v2.9.0) javascript development - as needed for a new project - what would be the alternative in YUI to select a certain record in a data table(the equivalent of the gridpanel in EXT) based on the value of a given property of that record? In EXT one could use the following:

new Ext.grid.GridPanel({...}).getStore( ).find(fieldName, value);

In YUI the YAHOO.widget.DataTable class has some own methods to retrieve Record instances(YAHOO.widget.Record): getRecord(),getRecordIndex() or to retrieve the whole record set: getRecordSet() - an instance of the YAHOO.widget.RecordSet class - and use some methods of this class to get records(getRecord()) but none of these methods can retrieve records based on the value of one property. I'm a bit surprised that YUI doesn't have this basic functionality(It should have been at the YAHOO.widget.RecordSet class level).

Galileo_Galilei
  • 117
  • 2
  • 5

1 Answers1

0

I'm afraid there is no such functionality. You'll have to loop through all the Record instances in the RecordSet yourself. In the last 2.9 version of YUI, the API documents for Record, RecordSet and ScrollingDataTable got misplaced and are along those for the DOM, which makes it somewhat hard to locate unless you simply use the search box.

Satyam
  • 96
  • 1