<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Dynamic Grid Panel for Ext JS</title> <atom:link href="http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/feed/" rel="self" type="application/rss+xml" /><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/</link> <description>WebDevelopment , PHP, Javascript, CakePHP, ExtJS</description> <lastBuildDate>Sat, 04 Feb 2012 19:46:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Mike</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-5157</link> <dc:creator>Mike</dc:creator> <pubDate>Wed, 11 Jan 2012 16:16:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-5157</guid> <description>Awesome!  Exactly what I wanted.  Thanks for your hard work.</description> <content:encoded><![CDATA[<p>Awesome!  Exactly what I wanted.  Thanks for your hard work.</p> ]]></content:encoded> </item> <item><title>By: Tom</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-5143</link> <dc:creator>Tom</dc:creator> <pubDate>Fri, 11 Nov 2011 17:13:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-5143</guid> <description>This is how I got this to work with v3.4
Ext.ux.DynamicGridPanel = Ext.extend(Ext.grid.EditorGridPanel, {
    id: &#039;my-grid&#039;,
    loadMask: true,
    border: false,
    stripeRows: true,
    initComponent: function() {
        Ext.applyIf(this, {
            ds: new Ext.data.Store({
                url: this.storeUrl,
                reader: new Ext.data.JsonReader()
            }),
            columns: []
        });
        Ext.ux.DynamicGridPanel.superclass.initComponent.call(this);
    },
    onRender: function(ct, position) {
        this.colModel.defaultSortable = true;
        RPS.Tools.DropDownEditorUi.superclass.onRender.call(this, ct, position);
        this.store.on(&#039;load&#039;, function() {
            this.store.baseParams = {dropdown: &#039;none&#039;};
            /**
             * Thats the magic!
             *
             * JSON data returned from server has the column definitions
             */
            if (typeof(this.store.reader.jsonData.columns) === &#039;object&#039;) {
                var columns = [];
                /**
                 * Adding RowNumberer or setting selection model as CheckboxSelectionModel
                 * We need to add them before other columns to display first
                 */
                if (this.rowNumberer) {
                    columns.push(new Ext.grid.RowNumberer());
                }
                if (this.checkboxSelModel) {
                    columns.push(new Ext.grid.CheckboxSelectionModel());
                }
                Ext.each(this.store.reader.jsonData.columns, function(column) {
                    columns.push(column);
                });
                /**
                 * Setting column model configuration
                 */
                this.getColumnModel().setConfig(columns);
            }
        }, this);
        /**
         * And finally load the data from server!
         */
        this.store.load();
    }
});
Array setup for php:
        $metadata = array(&#039;metaData&#039; =&gt; array(&#039;totalProperty&#039; =&gt; &#039;total&#039;, &#039;root&#039; =&gt; &#039;records&#039;, &#039;id&#039; =&gt; &#039;id&#039;, &#039;fields&#039; =&gt; array(array(&#039;name&#039; =&gt; &#039;id&#039;, &#039;type&#039; =&gt; &#039;int&#039;), array(&#039;name&#039; =&gt; &#039;name&#039;, &#039;type&#039; =&gt; &#039;string&#039;))));
        $columns = array(&#039;columns&#039; =&gt; array(array(&#039;header&#039; =&gt; &#039;#&#039;, &#039;dataIndex&#039; =&gt; &#039;id&#039;, &#039;editor&#039; =&gt; array(&#039;xtype&#039; =&gt; &#039;textfield&#039;)), array(&#039;header&#039; =&gt; &#039;User&#039;, &#039;dataIndex&#039; =&gt; &#039;name&#039;)));
        $records = array(&#039;records&#039; =&gt; array(array(&#039;id&#039; =&gt; 1, &#039;name&#039; =&gt; &#039;AAA&#039;), array(&#039;id&#039; =&gt; 2, &#039;name&#039; =&gt; &#039;BBB&#039;)));
        $result = array_merge($metadata, array(&#039;success&#039; =&gt; 1, &#039;total&#039; =&gt; 50), $records, $columns);
         echo json_encode($result);</description> <content:encoded><![CDATA[<p>This is how I got this to work with v3.4</p><p>Ext.ux.DynamicGridPanel = Ext.extend(Ext.grid.EditorGridPanel, {<br
/>     id: &#8216;my-grid&#8217;,<br
/>     loadMask: true,<br
/>     border: false,<br
/>     stripeRows: true,<br
/>     initComponent: function() {<br
/>         Ext.applyIf(this, {<br
/>             ds: new Ext.data.Store({<br
/>                 url: this.storeUrl,<br
/>                 reader: new Ext.data.JsonReader()<br
/>             }),<br
/>             columns: []<br
/>         });<br
/>         Ext.ux.DynamicGridPanel.superclass.initComponent.call(this);<br
/>     },<br
/>     onRender: function(ct, position) {<br
/>         this.colModel.defaultSortable = true;<br
/>         RPS.Tools.DropDownEditorUi.superclass.onRender.call(this, ct, position);<br
/>         this.store.on(&#8216;load&#8217;, function() {<br
/>             this.store.baseParams = {dropdown: &#8216;none&#8217;};<br
/>             /**<br
/>              * Thats the magic!<br
/>              *<br
/>              * JSON data returned from server has the column definitions<br
/>              */<br
/>             if (typeof(this.store.reader.jsonData.columns) === &#8216;object&#8217;) {<br
/>                 var columns = [];<br
/>                 /**<br
/>                  * Adding RowNumberer or setting selection model as CheckboxSelectionModel<br
/>                  * We need to add them before other columns to display first<br
/>                  */<br
/>                 if (this.rowNumberer) {<br
/>                     columns.push(new Ext.grid.RowNumberer());<br
/>                 }<br
/>                 if (this.checkboxSelModel) {<br
/>                     columns.push(new Ext.grid.CheckboxSelectionModel());<br
/>                 }<br
/>                 Ext.each(this.store.reader.jsonData.columns, function(column) {<br
/>                     columns.push(column);<br
/>                 });<br
/>                 /**<br
/>                  * Setting column model configuration<br
/>                  */<br
/>                 this.getColumnModel().setConfig(columns);<br
/>             }<br
/>         }, this);<br
/>         /**<br
/>          * And finally load the data from server!<br
/>          */<br
/>         this.store.load();<br
/>     }<br
/> });</p><p>Array setup for php:<br
/>         $metadata = array(&#8216;metaData&#8217; =&gt; array(&#8216;totalProperty&#8217; =&gt; &#8216;total&#8217;, &#8216;root&#8217; =&gt; &#8216;records&#8217;, &#8216;id&#8217; =&gt; &#8216;id&#8217;, &#8216;fields&#8217; =&gt; array(array(&#8216;name&#8217; =&gt; &#8216;id&#8217;, &#8216;type&#8217; =&gt; &#8216;int&#8217;), array(&#8216;name&#8217; =&gt; &#8216;name&#8217;, &#8216;type&#8217; =&gt; &#8216;string&#8217;))));<br
/>         $columns = array(&#8216;columns&#8217; =&gt; array(array(&#8216;header&#8217; =&gt; &#8216;#&#8217;, &#8216;dataIndex&#8217; =&gt; &#8216;id&#8217;, &#8216;editor&#8217; =&gt; array(&#8216;xtype&#8217; =&gt; &#8216;textfield&#8217;)), array(&#8216;header&#8217; =&gt; &#8216;User&#8217;, &#8216;dataIndex&#8217; =&gt; &#8216;name&#8217;)));<br
/>         $records = array(&#8216;records&#8217; =&gt; array(array(&#8216;id&#8217; =&gt; 1, &#8216;name&#8217; =&gt; &#8216;AAA&#8217;), array(&#8216;id&#8217; =&gt; 2, &#8216;name&#8217; =&gt; &#8216;BBB&#8217;)));<br
/>         $result = array_merge($metadata, array(&#8216;success&#8217; =&gt; 1, &#8216;total&#8217; =&gt; 50), $records, $columns);<br
/>          echo json_encode($result);</p> ]]></content:encoded> </item> <item><title>By: Anbarasanpajani</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-5134</link> <dc:creator>Anbarasanpajani</dc:creator> <pubDate>Mon, 26 Sep 2011 10:32:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-5134</guid> <description> Dynamic paging code has helped me. Pagination on this dynamic grid using bbar is not working. Any info would be highly appreciated.</description> <content:encoded><![CDATA[<p> Dynamic paging code has helped me. Pagination on this dynamic grid using bbar is not working. Any info would be highly appreciated.</p> ]]></content:encoded> </item> <item><title>By: Pwelby</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-5120</link> <dc:creator>Pwelby</dc:creator> <pubDate>Wed, 13 Jul 2011 19:36:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-5120</guid> <description>Can you post an example of the PHP code you are using to pull out the JSON? I am having some trouble getting my PHP to generate the proper JSON metaData as output to be read by this process.</description> <content:encoded><![CDATA[<p>Can you post an example of the PHP code you are using to pull out the JSON? I am having some trouble getting my PHP to generate the proper JSON metaData as output to be read by this process.</p> ]]></content:encoded> </item> <item><title>By: Onofabio</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-5116</link> <dc:creator>Onofabio</dc:creator> <pubDate>Thu, 16 Jun 2011 16:02:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-5116</guid> <description>What you want to say with &quot;online data&quot;</description> <content:encoded><![CDATA[<p>What you want to say with &#8220;online data&#8221;</p> ]]></content:encoded> </item> <item><title>By: Luigimapu</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-5093</link> <dc:creator>Luigimapu</dc:creator> <pubDate>Thu, 04 Nov 2010 17:36:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-5093</guid> <description>no, i had changed my application. but what is your problem?</description> <content:encoded><![CDATA[<p>no, i had changed my application. but what is your problem?</p> ]]></content:encoded> </item> <item><title>By: Booka</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-5092</link> <dc:creator>Booka</dc:creator> <pubDate>Thu, 04 Nov 2010 08:28:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-5092</guid> <description>luigimapu, did you solve your problem ? I&#039;ve the same problem. It happens when i use &quot;offline data&quot;. With &quot;online data&quot;, it works !</description> <content:encoded><![CDATA[<p>luigimapu, did you solve your problem ? I&#8217;ve the same problem. It happens when i use &#8220;offline data&#8221;. With &#8220;online data&#8221;, it works !</p> ]]></content:encoded> </item> <item><title>By: Anonymous</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-4485</link> <dc:creator>Anonymous</dc:creator> <pubDate>Mon, 13 Sep 2010 23:29:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-4485</guid> <description>i can&#039;t see the data in the grid. It&#039;s blocked on &#039;Loading...&#039;</description> <content:encoded><![CDATA[<p>i can&#8217;t see the data in the grid. It&#8217;s blocked on &#8216;Loading&#8230;&#8217;</p> ]]></content:encoded> </item> <item><title>By: Luigimapu</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-5088</link> <dc:creator>Luigimapu</dc:creator> <pubDate>Mon, 13 Sep 2010 23:22:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-5088</guid> <description>HI,
i try the application, but i can&#039;t see the data in the grid. The application is blocked on &#039;LOADING...&#039;, after show me the empty grid.
Can you help me to resolve this problem?
Thank you</description> <content:encoded><![CDATA[<p>HI,<br
/> i try the application, but i can&#8217;t see the data in the grid. The application is blocked on &#8216;LOADING&#8230;&#8217;, after show me the empty grid.<br
/> Can you help me to resolve this problem?<br
/> Thank you</p> ]]></content:encoded> </item> <item><title>By: James Gough</title><link>http://www.erhanabay.com/2009/01/29/dynamic-grid-panel-for-ext-js/#comment-3955</link> <dc:creator>James Gough</dc:creator> <pubDate>Tue, 17 Aug 2010 10:38:00 +0000</pubDate> <guid
isPermaLink="false">http://erhanabay.com/?p=159#comment-3955</guid> <description>Anyone able to convert this to an XML based grid?</description> <content:encoded><![CDATA[<p>Anyone able to convert this to an XML based grid?</p> ]]></content:encoded> </item> </channel> </rss>
