problems with RowSelection Model-Ext JS


SINGLE ROW
var tcs = grid.getSelectionModel().getSelected();
I get this error
this.selections.get At is not a function
MULTI-ROM
var tcs = grid.getSelectionModel().getSelections();
doesn't produce any javascript errors,but the array it returns isn't an array of row id's.
Here is my grid setup code:
     // preheats grid
      var cm = new Ext.grid.ColumnModel([
         {header: "ThermoCouple", dataIndex: 'tc', width: 89, sortable: true}, 
         {header: "Target Time", dataIndex: 'time', width: 75, sortable: true} 
      ]);
      var record = Ext.data.Record.create([
        {name: 'tc', mapping: 'tc'},
        {name: 'time', mapping: 'time'},
      ]); 
      var reader = new Ext.data.JsonReader({
        root: 'result',
        id: 'tc',
      }, record);        
      ds = new Ext.data.Store({
        proxy: new Ext.data.HttpProxy({url: 'preheat/tc'}),
        reader: reader
      });
      ds.setDefaultSort('tc');
      grid = new Ext.grid.Grid('preheats-grid', {
        ds: ds,
        cm: cm
      });
      grid.addListener('rowdblclick', viewGraph);
      grid.render();
  #

02-2007、09:01 AM
The 2 nd is a「documentation hasn't been udated error」.It actually returns an array of the full record object.
get Selected shord return 1 record object,but get At shound be itemat.
I have fixed both these ises and will be deploying a new zip shartly.
  #

02-2007、03:14 PM
get Selected()returns a MixedCollection.
What is the index property in the MixedCollection?
  #

02-2007、03:25 PM
Look at the source for MixedCollection-it's pretty copletely documented.You can cal item(key)、itemat(index)、etc.The's quite a few ways of getting the data.
グウグウグウグウグウグウグウグウ
Tim Ryan-Ext JS Support Team
Read BEFOREE posting a question/posting a Bug
Use Google to Search-API/Forum
API Doc(3.x 124.x)/FAQ/Wiki/Tutorils/1.x->2.0 Migration Guide
  #

02-2007、03:34 PM
Tim-
here is my code:
var deleteRow = sm.getSelected();		
deleteRow.each(function(key) {alert(key + ' : ' + deleteRow.get(key));});
I receive the error deleteRow.each is not a function.However if I use the line
deleteRow.get('title')
it pulls my data out fine…
Any help is apreciated
アーロン
  #

02-2007、03:53 PM
I haven't done munch ch with th is yet、but looking at the code、get Selected returns a Recocordd、not a MixeedeCollection.Get wotworks b/c Recod also a get method.I would suggggggggggstopping ststopping inininininindedededededededededededededededededededededestststststststaaatttttttttttttttttdedededededededededededededededededededededededededededededetttttttを選択します.try looking at the internal'data'property.
グウグウグウグウグウグウグウグウ
Tim Ryan-Ext JS Support Team
Read BEFOREE posting a question/posting a Bug
Use Google to Search-API/Forum
API Doc(3.x 124.x)/FAQ/Wiki/Tutorils/1.x->2.0 Migration Guide