Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to edit ExtJS grid data
    primarykey
    data
    text
    <p>I am creating two grids on my view. These two grids will be able to drag and drop items from one another as well as to themselves. Also, these grids must be editable. I am using rowediting plugin to edit the grid but I always get the error "Uncaught TypeError: Cannot call method 'getSelectionModel' of undefined." Without plugin the grid works fine and I don't get any error. What is the problem? Can someone point out? The code for my grid is:</p> <pre><code>Ext.define('DHT.view.Configuration.CategoriesConfig', { extend: 'Ext.panel.Panel', requires: ['DHT.model.Category','Ext.grid.*'], alias: 'widget.categoriesconfig', layout: { type: 'hbox', align: 'stretch' }, floating: true, closable: true, modal: true, height: 500, width: 800, title: 'Question Categories', items: [{ xtype: 'grid', title: 'Invisible', width: '47%', selType: 'rowmodel', viewConfig: { plugins: [{ ptype :'rowediting', clicksToEdit: 2 },{ ptype: 'gridviewdragdrop', dragGroup: 'invisible', dropGroup: 'visible' }, { ptype: 'gridviewdragdrop', dragGroup: 'invisible', dropGroup: 'invisible' }] }, store: { model: 'DHT.model.Category', data: [ { 'QuestionTypeID': 1, 'Description': 'A', 'SortOrder': 1 }, { 'QuestionTypeID': 2, 'Description': 'B', 'SortOrder': 2 }, { 'QuestionTypeID': 3, 'Description': 'C', 'SortOrder': 3 }, { 'QuestionTypeID': 4, 'Description': 'D', 'SortOrder': 4 } ] }, columns: [{ xtype: 'actioncolumn', id: 'deleteButton', width: '5%', align: 'center', items: [{ icon: 'Images/delete.png', tooltip: 'Delete' }]}, { header: 'Order', dataIndex: 'SortOrder', width: '34%', sortable: false, menuDisabled: true }, { header: 'Description', editable: true, editor: { xtype: 'textfield', allowBlank: false }, dataIndex: 'Description', width: '58%', sortable: false, menuDisabled: true }] }, { xtype: 'panel', title: '', width: '6%', title: '&amp;nbsp;' }, { xtype: 'grid', title: 'Visible', selType: 'rowmodel', width: '47%', viewConfig: { plugins: [{ ptype :'rowediting', clicksToEdit: 2 },{ ptype: 'gridviewdragdrop', dragGroup: 'visible', dropGroup: 'invisible' }, { ptype: 'gridviewdragdrop', dragGroup: 'visible', dropGroup: 'visible' }] }, store: { model: 'DHT.model.Category', data: [ { 'QuestionTypeID': 5, 'Description': 'E', 'SortOrder': 1 }, { 'QuestionTypeID': 6, 'Description': 'F', 'SortOrder': 2 }, { 'QuestionTypeID': 7, 'Description': 'G', 'SortOrder': 3 }, { 'QuestionTypeID': 8, 'Description': 'H', 'SortOrder': 4 } ] }, columns: [{ xtype: 'actioncolumn', id: 'deleteButton', width: '5%', align: 'center', items: [{ icon: 'Images/delete.png', tooltip: 'Delete' }]}, { header: 'Order', dataIndex: 'SortOrder', width: '34%', sortable: false, menuDisabled: true }, { header: 'Description', editable: true, editor: { xtype: 'textfield', allowBlank: false }, dataIndex: 'Description', width: '58%', sortable: false, menuDisabled: true }] }] }); </code></pre> <p>My model:</p> <pre><code>Ext.define('DHT.model.Category', { extend: 'Ext.data.Model', fields: [ { name: 'QuestionTypeID', dataType: 'int' }, { name: 'Description', dataType: 'string' }, { name: 'SortOrder', dataType: 'int' } ], idProperty: 'QuestionTypeID' }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload