ExtJs4 获取grid.panel中的被修改数据,该怎么处理

ExtJs4获取grid.panel中的被修改数据var updateBtnExt.create(Ext.Button, {text: 保存修改,ionCls:

ExtJs4 获取grid.panel中的被修改数据
var updateBtn=Ext.create('Ext.Button', {
  text: '保存修改',
  ionCls:"icon-edit",
  handler: function(){ 
  var _grid = Ext.getCmp("id_of_grid"); 
//我尝试了很多方法都获取不到
  var m = _grid.getStore().getUpdatedRecords();
if(m.length == 0) {
Ext.MessageBox.alert("信息","没有任何记录被修改");
return;
}
var jsonArray = [];
Ext.each(m,function(item){
jsonArray.push(item.data);
alert(item.data);
});
Ext.Ajax.request({
method:'POST',
url:'user_update.action',
success:function(response) {
Ext.MessageBox.alert("信息",response.responseText,function(){
store.load();
store.modified = []; 
});
},
failure:function(){
Ext.MessageBox.alert("错误","与后台联系的时候出了问题");
}
,
params:'data=' + Ext.encode(jsonArray)
});
  } 

});






  var grid = Ext.create('Ext.grid.Panel', {
  title:'Progress Bar Pager',
  id:'id_of_grid',
  selModel: selModel,
  renderTo:Ext.getBody(),
  region:'center',
  layout:'fit',
  border:false,
  store: store,
  columns: [{
  text: '编号',
  sortable: true,
  hidden:true,
  dataIndex: 'id',
  flex: 1
  },{
  text: '账号',
  sortable: true,
  // renderer: Ext.util.Format.usMoney,
  dataIndex: 'userAccount',
flex: 1,
editor: { 
  xtype: 'textfield'
  } 

  },{
  text: '真实姓名',
  sortable: true,
  renderer: change,
  dataIndex: 'realName',
flex: 1
,
editor: { 
  xtype: 'textfield'
  } 
  },{
  text: '职务',
  sortable: true,
  renderer: pctChange,
  dataIndex: 'userDuty',
flex: 1,
editor: { 
  xtype: 'textfield'
  } 
  },{
  text: '性别',
  sortable: true,
  renderer: pctChange,
  dataIndex: 'sex',
flex: 1,
editor:{ 
  xtype: 'combobox', 
id:'sex', 
typeAhead: true, 
triggerAction: 'all', 
queryMode: 'local',
store: sexstore,
selectOnTab: true, 
lazyRender: true, 
displayField:'name', 
valueField:'id', 
listClass: 'x-combo-list-small', 
listeners:{  
select : function(combo, record,index){ 
isEdit = true; 



  },renderer:rendererData 
  },  
  {
  text: '部门',
  id:'department',
  sortable: true,


  dataIndex: 'department',
flex: 1,
editor:{ 
  xtype: 'combobox', 
id:'authors', 
typeAhead: true, 
triggerAction: 'all', 
queryMode: 'local',
store: cbstore,
selectOnTab: true, 
lazyRender: true, 
displayField:'name', 
valueField:'id', 
listClass: 'x-combo-list-small', 
listeners:{  
select : function(combo, record,index){ 
isEdit = true; 



  },renderer:rendererData 
  },{
  text: '住址',
  sortable: true,
  renderer: change,
  dataIndex: 'address',
flex: 1
,
editor: { 
  xtype: 'textfield'
  } 
  }, {
  text: '入职时间',
  sortable: true,
  dataIndex: 'entryTime',
flex: 1,
field: { 
  xtype: 'datefield', 
  format: 'y-m-d', 
  minValue: '01/01/06'
  } 

  }],
  stripeRows: true,
  frame:true,
  tbar:[refreshBtn,'-',addBtn,'-',updateBtn,'-',deleteBtn,'->','部门:',departmentComboBox,searchBtn],
  bbar: Ext.create('Ext.PagingToolbar', {
  pageSize: 2,
  store: store,
  displayInfo: true
  }),
  plugins: [cellEditing]
  });

[解决办法]
var _grid = Ext.getCmp("id_of_grid").getValue;
你的grid是个什么,是整个grid么??