[CLOSED] GridPanel: columns property empty after reconfigure method issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] GridPanel: columns property empty after reconfigure method issue

    Hi!

    Before I update my sources with last trunk version of svn, when I called the method reconfigure, the property 'columns' of my grid was filled with columns that I set in reconfigure method. I think that I was working with 2.2 ext.net dll version.

    After I update my sources to last trunk version of SVN, after that I call reconfigure method, the columns of gridPanel property still empty.

    Sample project:

    <%@ Page Language="vb" %>
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
    
        <style type="text/css">
            .indicator-red-text {
                color: red;
                font-weight:bold;
            }
        </style>
    
        <script type="text/javascript">
    
            Ext.onReady(function () {
    
                var viewPort = Ext.create("Ext.net.Viewport", {
                    id: "ViewportConsole",
                    renderTo: Ext.getBody(),
                    layout: {
                        type: 'vbox',
                        align: 'stretch'
                    },
                    padding: 20
                });
    
                //mainContainer
                var paneCenter = viewPort.add({
                    xtype: 'container',
                    itemId: 'paneCenter',
                    xtype: 'container',
                    flex: 1,
                    border: false,
                    layout: 'border',
                    padding: 20
                });
                            
                var grid1 = paneCenter.add({
                    xtype: 'grid',
                    itemId: 'grd1',
                    region: 'center',
                    flex: 1,
                    title: 'grid 1',
                    store: [],
                    columns: []
                });
    
                var btnReconfigure = paneCenter.add({
                    xtype: 'button',
                    text: 'Reconfigure',
                    region: 'south',
                    height: 100,
                    listeners: {
                        click: {
                            fn: function (item) {
    
                                var store = Ext.create("Ext.data.Store", {
                                    model: Ext.define(Ext.id(), {
                                        extend: "Ext.data.Model",
                                        fields: [{ name: 'field1' }, { name: 'field2' }, { name: 'field3' }]
                                    }),
                                    storeId: Ext.id(),
                                    autoLoad: true,
                                    proxy: {
                                        data: [
                                            { field1: 1, field2: 'row 1', field3: '1/1/2013' },
                                            { field1: 2, field2: 'row 2', field3: '2/1/2013' },
                                            { field1: 3, field2: 'row 3', field3: '3/1/2013' },
                                        ],
                                        type: 'memory'
                                    }
                                });
    
                                var columns = [{
                                    dataIndex: "field1",
                                    text: 'Field 1',
                                    width: 50
                                }, {
                                    dataIndex: "field2",
                                    text: "Field 2",
                                    width: 110,
                                    flex: 1
                                }, {
                                    dataIndex: "field3",
                                    text: "Field 3",
                                    width: 100
                                }];
    
                                grid1.reconfigure(store, columns);
    
                            }
                        }
                    }
                });
    
            });
    
        </script>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" />
        <form id="form1" runat="server">
        <div>
        
        </div>
        </form>
    </body>
    </html>
    Last edited by Daniil; Jan 28, 2014 at 10:06 AM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] GridPanel reconfigure issue
    By snow_cap in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 10, 2013, 7:58 PM
  2. Replies: 22
    Last Post: Jan 25, 2012, 8:46 PM
  3. [CLOSED] [1.0] GridPanel's reconfigure reset columns' filter property
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Sep 21, 2011, 10:39 AM
  4. Replies: 0
    Last Post: Aug 17, 2010, 5:20 PM
  5. [CLOSED] Problem with grid panel property Reconfigure?
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 28, 2009, 10:45 AM

Posting Permissions