View Full Version : EXT JS 3.0 statefull grid - cannot load preferences from cookies

8 Oct 2013, 12:13 AM
In EXTJS 3.0, i create grid object from getting code from INTERNET as dynamic grid panel script (use to dynamic generate columns). for making state full i add attribute as state full true , provide state id and set cookies provider. cookies is created with given id but when i reload page i haven't got my preferences. below is the code i write to creat grid

var PageLoad = { init : function(){ Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); var newContentDiv= document.getElementById("inboxDataContent"); newContentDiv.innerHTML=""; gridInbox = new Ext.ux.DynamicGridPanel({ id: 'Transaction-grid', storeUrl: 'abc.json', rowNumberer: false, renderTo : 'inboxDataContent', checkboxSelModel: false, enableColumnMove:true, stateful: true, stateId: 'Transaction-gridpanel', stateEvents: ['columnresize', 'columnmove', 'show', 'hide'], //sortInfo: {field: 'tbl-fld-tr-date', direction: 'ASC'}, height : 520 }); } }; Ext.EventManager.onDocumentReady(PageLoad.init, PageLoad, true);

code: dynamic grid panel configs from which i create my grid object

var config = { viewConfig: {forceFit: true,scrollOffset:10}, enableColLock: false, loadMask: true, border: true, stripeRows: true, padding : '0px', shadow:false, width: 950, height : this.height, shim : false, forceFit:true, enableRowBody:false, showPreview:false, enableColumnMove:true, stateful: true, plugins: new Ext.ux.plugins.MultiLineHeader(), ds: mystore , bbar : new Ext.PagingToolbar({ pageSize: 10, store: mystore, emptyMsg: "No topics to display" ,layoutConfig:{onLayout: function (ct, target){ if(!this.leftTr){ target.addClass('x-toolbar-layout-ct'); target.insertHtml('beforeEnd', '<table cellspacing="0" class="x-toolbar-ct"><tbody><tr><td class="x-toolbar-left" align="left"><table cellspacing="0" align="right"><tbody><tr class="x-toolbar-left-row"></tr></tbody></table></td><td class="x-toolbar-right" align="right"><table cellspacing="0" class="x-toolbar-right-ct"><tbody><tr><td><table cellspacing="0"><tbody><tr class="x-toolbar-right-row"></tr></tbody></table></td><td><table cellspacing="0"><tbody><tr class="x-toolbar-extras-row"></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table>'); this.leftTr = target.child('tr.x-toolbar-left-row', true); this.rightTr = target.child('tr.x-toolbar-right-row', true); this.extrasTr = target.child('tr.x-toolbar-extras-row', true); } this.constructor.prototype.onLayout.call(this, ct, target); }} }), columns: [], gridId : '' };

I m badly stuck why grid cannot load its preferences even cookies are created.

8 Oct 2013, 9:26 AM
Hi, this is the EXT GWT forum and you have posted an EXT JS question. Please post your question in the appropriate forum. Thanks.

16 Oct 2013, 11:41 AM
I'm not familiar with the DynamicGridPanel. Sencha doesn't support extensions created by the community. You might reach out to the author of the extension for further support.