1. #11
    Ext User
    Join Date
    May 2010
    Location
    China, Zhejiang province, Ningbo City, a small city of 5 million people..
    Posts
    12
    Vote Rating
    0
    kiminox is on a distinguished road

      0  

    Default


    Well,

    It seems that it doesn't work.
    I added this parameter to my grid and wrote an alert:


    Code:
    kmxgz.ordercmpappro.prototype.run = function () {
        var _self = this;
        var myViewConfig = {
            onDataChange: function(store){
            alert('onDataChange');
                _self.kmx_cmpappro_store.loadData(store.reader.jsonData);
                _self.kmx_order_store.loadData(store.reader.jsonData);
                this.constructor.prototype.onDataChange.apply(this, arguments);          
            }
        };
        // -----------------------------------------
        // LAST STEP: render the grid, NOT BEFORE!
        // -----------------------------------------
        // load combobox stores BEFORE grid
        this.kmx_cmpappro_store.load({
            callback: function() {
                _self.kmx_order_store.load({
                    callback: function() {
                        kmxgz.factory.kmxEditorGridPanel.prototype.run.call(_self, myViewConfig);
                    }
                });
            }
        });
    };
    When I create the grid:


    _
    Code:
              [...]
              
                alert(print_r(myViewConfig)); <== I can see the content of the object with this alert
              kmx_object_grid = new Ext.grid.EditorGridPanel({
                    id:                         _self.kmx_gridpanel_id
                    , title:                    _self.kmx_grid_title_text
                    [...]
                    , viewConfig: myViewConfig
                    [...]
                });
    But when I changed something in the grid or when I click on the reload/refresh button, I can see the Ajax call to reload the data for the grid but not the ajax calls for the combobox.

    I think I don't have a special big application, just an application: I mean it's probably a common issue no?
    Did somebody meet that before?
    Is there anything in EXTJS to solve that?
    I think about the callback: but how to use it in this case?
    Thank you

  2. #12
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    No, this solution requires that the grid data also contains the data for the comboboxes.

  3. #13
    Ext User
    Join Date
    May 2010
    Location
    China, Zhejiang province, Ningbo City, a small city of 5 million people..
    Posts
    12
    Vote Rating
    0
    kiminox is on a distinguished road

      0  

    Default


    Thank you Condor.
    My problem is actually half-solved...
    but I will try to find a solution.

  4. #14
    Sencha User
    Join Date
    Nov 2012
    Posts
    4
    Vote Rating
    0
    ravi9999 is on a distinguished road

      0  

    Default


    hi kiminox, i am ravi please help me in download data from grid to excel data sheet ,

Thread Participants: 2

Tags for this Thread