Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    8
    Vote Rating
    0
    diet1986 is on a distinguished road

      0  

    Default Unanswered: Editable Grid panel giving type error b is not defined

    Unanswered: Editable Grid panel giving type error b is not defined


    Hi All, i have a Ext 4 js Grid as below.I have implemented editable plugin in it to change the cells values of the grid.


    Code:
    Ext.define('tpsyndev.view.filedatapreview', {
        extend: 'Ext.grid.Panel',
        alias: 'widget.filedatapreview',
        selType: 'cellmodel',
        width:400,
        height:200,
        autoDestroy:true,
        autoScroll:true,
        id : 'fileuploadpreview',
        //enableLocking : true,
        collapsible: true,
                  x: 10,
                  y: 5,
                  columns: [
                            {
                                text: 'Customer Number',
                                flex: 70,
                                dataIndex: 'customerNumber',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'Supplier Number',
                                flex: 70,
                                dataIndex: 'supplierNumber',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'Party1ItemNumber',
                                flex: 70,
                                dataIndex: 'party1ItemNumber',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'Party2ItemNumber',
                                flex: 70,
                                dataIndex: 'party2ItemNumber',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'Item Description',
                                flex: 70,
                                dataIndex: 'itemDescripton',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'Currency',
                                flex: 70,
                                dataIndex: 'currency',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'BaseUOM',
                                flex: 70,
                                dataIndex: 'baseUOM',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            }, 
                             {
                                text: 'Price',
                                flex: 70,
                                dataIndex: 'price',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'StartDate',
                                flex: 70,
                                dataIndex: 'startDate',
                                xtype: 'datecolumn',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'End Date',
                                flex: 70,
                                dataIndex: 'endDate',
                                xtype: 'datecolumn',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'ActiveFlag',
                                flex: 70,
                                dataIndex: 'activeFlag',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            },
                            {
                                text: 'Validation Errors',
                                flex: 70,
                                dataIndex: 'validations',
                                cls: 'font-weight:bold;color:#04408c',
                                editor: 'textfield'
                            }
                            ],
                  collapsible: false,
                  plugins: [
                            Ext.create('Ext.grid.plugin.CellEditing', {
                                clicksToEdit: 1
                            })
                            ],
                  autoScroll: true,
                  title: 'Uploaded Data Preview',
                  columnLines: true,
                  sortableColumns: true,
                 // multiSelect: true,
                  store:'tempPartyRelations',
                  dockedItems: [{
                      xtype: 'pagingtoolbar',
                      dock: 'bottom',
                      layout: {
                          pack: 'left'
                      },
                      items: [
                              { xtype: 'component', flex: 1 },
                              { xtype: 'button', text: 'Submit', width: 80, listeners: {
                                  'click': function() {
                                      var datar = new Array();
                                        var jsonDataEncode = "";
                                        var records = Ext.widget('filedatapreview').getStore().getRange();
                                        for (var i = 0; i < records.length; i++) {
                                            datar.push(records[i].data);
                                        }
                                        jsonDataEncode = Ext.encode(datar);
                                      Ext.Ajax.request({
                                            url: '/tpsyndev/MainLayout/saveTempPartiesDataToMainDomian',
                                            params: {
                                                tempParties: jsonDataEncode
                                            },
                                            success: function(response) {
                                                var text = response.responseText;
                                                // process server response here. For example
                                                alert('Success fully saved');
                                                Ext.getCmp('filedatapreview').getStore().removeAll();
                                                
                                            }
                                          });
                                  }
                              }
                           },{ xtype: 'button', text: 'Validate', width: 80, listeners: {
                                  'click': function() {
                                      var datar = new Array();
                                        var jsonDataEncode = "";
                                        var records = Ext.widget('filedatapreview').getStore().getRange();
                                        for (var i = 0; i < records.length; i++) {
                                            datar.push(records[i].data);
                                        }
                                        jsonDataEncode = Ext.encode(datar);
                                        var k = eval( jsonDataEncode )
                                      Ext.Ajax.request({
                                            url: '/tpsyndev/MainLayout/validateGridData',
                                            params: {
                                                tempParties: jsonDataEncode
                                            },
                                            success: function(response) {
                                                var text = response.responseText;
                                                // process server response here. For example
                                                alert('validation check');
                                                Ext.getCmp('filedatapreview').getStore().load({
                                                    params: {
                                                        runID:k[0].processRunDetailsId,
                                                        type: 'json'
                                                    },
                                                    callback: function(records, operation, success) {
                                                        Ext.getCmp('filedatapreview').getView().refresh();
                                                    },
                                                    scope: this
                                                });
                                            }
                                          });
                                  }
                              }
                           }
                        ]
                  }],
    });
    I am trying to load store and refresh grid on click of validate button and after this when i am trying to change the value of any cell of the grid i am getting type error b is undefined.
    Last edited by diet1986; 5 Nov 2012 at 2:30 AM. Reason: code formatting

Thread Participants: 1

Tags for this Thread