Langsung ke konten utama

Item context menu pada Extjs

Item context menu
var historyView_inbox_back = Ext.create('Ext.grid.Panel', {
        width:875,
        height:275,
  store:log_history_inbox,  
  margin:'0 0 0 0',  
        viewConfig: {
            emptyText: 'No Data'
        },
  listeners : {  
      itemcontextmenu :  function( grid, record, item, index, event){
    event.stopEvent();
    var menu = Ext.create('Ext.menu.Menu',{
     items: [{
      text: 'Reply SMS',
      iconCls: 'sms',
      disabled : false,
      handler: function() { 
                           var phone_number      = Ext.getCmp('phone_number').setValue(record.data['SenderNumber']); 
         dialog_send_sms.show();  
      }
     }]
    });
    menu.showAt(event.xy);
   }
  },
        columns: [{ name:'ReceivingDateTime',
     header:'ReceivingDateTime',
     dataIndex:'ReceivingDateTime',     
     width:125,
    },{ name:'SenderNumber',
     header:'SenderNumber',
     dataIndex:'SenderNumber',     
     width:125,
    },{ name:'TextDecoded',
     header:'Message',
     dataIndex:'TextDecoded',     
     width:600,
     renderer : renderTip,
    }],
   bbar:{ xtype: 'pagingtoolbar',
       store : log_history_inbox,    
       displayInfo: true,
       displayMsg: 'Displaying {0} - {1} of {2}',
  } 
 });

Komentar

Popular Posts

Menambahkan Item Id untuk HTML Attribut

{ border:false, frame:false, width: 225, margin: '5px 0px 10px 9px', items: [{ xtype : 'textfield', fieldLabel : 'Telephone', inputType :'password', id : 'telephone', inputId: 'item_telepon', width: 225, readOnly : true, fieldStyle :'background-image:none;background-color:#BDBDBD', },{ xtype : 'textfield', fieldLabel : 'Office no', inputType :'password', width: 225, id :'office_no', inputId: 'item_office_no', readOnly : true, fieldStyle :'background-image:none;background-color:#BDBDBD', },{ xtype : 'textfield', fieldLabel : 'Mobile no', inputType :'password', width: 225, id:'mobile_no', inputId: 'item_mobile_no', readOnly : true, fieldStyle :'back...

Extjs html class render

Ext.select('.datepicker').each(function(el){ new Ext.form.DateField({ allowBlank : true, renderTo: el, format:'m-d-Y', editable:false, width:140, fieldCls : 'tanggal x-form-field x-form-text x-trigger-noedit', }); }); Ext.select('.note').each(function(el){ new Ext.form.field.TextArea({ allowBlank : false, renderTo: el, grow : true, hideLabel : true, fieldCls : 'pesan x-form-field x-form-text x-trigger-noedit', }); });