0 Replies Latest reply: Jan 14, 2013 9:12 AM by 973388 RSS

    EXTJS - Problem in Grid

    973388
      I have a Grid and lets say we have 2 records in it, First column has checkbox and there is one editable text field in each row. When i select 2 of the records through checkbox the checkboxes are selected as expected but problem is when i click on editable text field of any one record out of the 2 here the check box of other record is getting deselected. Below is the code snippet. Please let me know any solution for this one?


      Ext.define('Cp.view.fe.MatchAddressGrid', {
           extend: 'Ext.grid.Panel',
           requires: [
           'Cp.store.fe.FEGridStore'
           ],
           alias: 'widget.matchaddressgrid',
           store: 'FEGridStore',
           enableColumnHide: false,
           emptyText: 'No records to display',
           layout: 'fit',
           forceFit: false,
           selModel: Ext.create('Ext.selection.CheckboxModel', {                 
                     singleSelect: false,
                sortable: false,
                checkOnly: true,
                stateful: true,
                showHeaderCheckbox: false          
           }),
           dockedItems: [{
                xtype: 'pagingtoolbar',
                dock: 'bottom',
                store: 'FEGridStore',
                displayInfo: true,
                displayMsg: 'Displaying Records {0} - {1} of {2}',
                emptyMsg: 'No data to display',
                listeners: {
                afterrender: function() {
                this.down('#refresh').hide();
                }
                }
                }],
           plugins: [
                Ext.create('Ext.grid.plugin.CellEditing',{
                     clicksToEdit: 1
                     })      
                ],
           columns: {
           items: [],
           defaults: {
           sortable: false,
           width: 80
           }
           },
           initComponent: function() {
           var me = this;
           me.callParent(arguments);
           }
           });

      Edited by: 970385 on Jan 14, 2013 7:11 AM