var panel1 = new Ext.Panel({
  title: 'Standard',
  renderTo : Ext.getBody(),
  width: '100%',
  height: 600,
  title: 'Grid1',
  layout: 'fit',
	autoScroll: true,
  items: [{
    xtype     : 'ec2.EditGrid',
    proxy     : 'ec2dbProxy.aspx',
    model     : 'product',
    width     : '100%',
    renderTo  : Ext.getBody(),
    height    : 600,
    slayout   : 'fit',
    blankRows : 0,
    id        : 'grid',
    tbar      : new Ext.Toolbar({
      store: this.store,
      emptyMsg: "No rows",
      defaultType: 'textfield',
      items: [{
        xtype:'tbbutton',
        cls:  'x-btn-text-icon',
        tooltip: 'Add new record',
        icon: '/system/images/add.gif',
        handler: function(){
          var me = Ext.getCmp('grid');
          me.insertEmptyRow(1);
        }
      }]
    }),
    
    columns: [
      new Ext.grid.RowNumberer(),
    {
      header: 'Id', 
      renderer: function(v) {return ec2.editDec(v,0)},
      sortable: true, 
      dataIndex: 'PRODKEY',
      align: 'right',
      editor: new Ext.form.NumberField({
        decimalPrecision:0,
      })
    },{
      header: 'Text', 
      width: 200, 
      sortable: true, 
      dataIndex: 'DESC'  ,
      editor: new App.beskrivelse({
      })
    },{
      header: 'Price', 
      renderer: function(v) {return ec2.editDec(v,2)},
      sortable: true, 
      dataIndex: 'PRICE',
      align: 'right',
      editor: new Ext.form.NumberField({
        decimalPrecision:2,
        decimalSeparator:','
      })
    },{
      header: 'Manufacturer', 
      sortable: true, 
      dataIndex: 'MANUID'
    },{
      header: 'Last Updated', 
      width: 50,
      sortable: true, 
      dataIndex: 'STOCKDATE', 
      xtype: 'datecolumn', 
      renderer: Ext.util.Format.dateRenderer('d-m-Y'),
      editor: new Ext.form.DateField({
        format: 'd-m-Y',
      })
    }],
  }]
});


      



