Note that there are some explanatory texts on larger screens.

plurals
  1. POextjs grid grouping : selection scrambled
    primarykey
    data
    text
    <p>I currently have a grid with a grouping feature that gets data from a fixed store:</p> <pre><code>Ext.define('YUK.store.FakePendingDocs', { extend: 'Ext.data.Store', id: 'FakePendingDocs', autoSync: false, proxy: { type: 'memory' }, fields: [ { name: 'docId', mapping: 'did' } , { name: 'name', mapping: 'name'}//, mapping : 'name'} , { name: 'client',mapping: 'cid' } , { name: 'description', mapping: 'description' } , { name: 'uploadeddate', mapping: 'dl', type: 'date', dateFormat: 'MS' } , { name: 'folder', mapping: 'fo' } , { name: 'group', mapping: 'gr' } ], groupers: [{ property: 'group', direction: 'ASC' }],. data: [ ... ] } ); </code></pre> <p>Then i do in my grid: </p> <pre><code>Ext.define('YUK.view.center.pendingdocuments.Panel', { extend: 'Ext.grid.Panel', alias: 'widget.documents', id: 'documents', title: 'My Documents', store: 'FakePendingDocs', hideHeaders: true, forceFit: true, groupField: 'group', .... </code></pre> <p>But i have the problem that my selection is scrambled in my grid (i select an item and i get another one). I found this <a href="http://www.sencha.com/forum/showthread.php?208453" rel="nofollow">http://www.sencha.com/forum/showthread.php?208453</a> thread to solve this. But since i'm new to sencha i don't know how to override this. I have done things like :</p> <pre><code>Ext.define('YUK.store.FakePendingDocs', { extend: 'Ext.data.Store', id: 'FakePendingDocs', autoSync: false, proxy: { type: 'memory' }, fields: [ { name: 'docId', mapping: 'did' } , { name: 'name', mapping: 'name'}//, mapping : 'name'} , { name: 'client',mapping: 'cid' } , { name: 'description', mapping: 'description' } , { name: 'uploadeddate', mapping: 'dl', type: 'date', dateFormat: 'MS' } , { name: 'folder', mapping: 'fo' } , { name: 'group', mapping: 'gr' } ], groupers: [{ property: 'group', direction: 'ASC' }],. data: [ ... ], sort:function(){ var me = this, groups, g; me.callOverridden(arguments); groups = me.getGroups(); me.data.clear(); Ext.Array.each(groups, function (group) { Ext.Array.each(group.children, function (child) { me.data.add(child.internalId, child); }); }); me.fireGroupChange(); } } ); </code></pre> <p>But this doesn't work , neither does putting it in the grid.</p> <p>Can someone help me with this ?</p> <p>P.S: my groupingfeature for the grid looks like this: </p> <pre><code>var groupingFeature = Ext.create('Ext.grid.feature.Grouping', { groupHeaderTpl: '{name}' }); </code></pre> <p><a href="http://www.sencha.com/forum/showthread.php?208453-4.0.2-Selection-model-returns-wrong-record-when-Grouping-feature-is-enabled/page2" rel="nofollow">Thread on Sencha Forums</a></p>
    singulars
    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.
 

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