Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    2
    Vote Rating
    0
    daviboysmith is on a distinguished road

      0  

    Default Extjs 4.x Return value from Ext.window.window combobox to update selected records

    Extjs 4.x Return value from Ext.window.window combobox to update selected records


    Firstly I am new to EXTJS and am stuck with this issue and no solution for weeks. Your help is much appreciated.

    I have a grid with CheckboxModel. So a user can select x rows and click on button called "Update Status". This button should open a pop-up window with list of Statuses (Active, In-Active, Closed etc.) in a combobox and button for save and cancel. When user presses Save, update all selected rows/records with the selection value in the combobox, can close the window.
    .....///
    selModel: Ext.create('Ext.selection.CheckboxModel', {
    listeners: {
    selectionchange: function (sm, selections) {
    Ext.ComponentQuery.query('#UpdateStatus')[0].setDisabled(selections.length == 0);
    }
    }
    ....../////
    SampleExtJS4Image.jpg

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,862
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Here is some code I used to do the same thing. It change the status of selected record in grid.

    This uses a remove table and sends the id's of the selected records to the server where the updating is handled

    Code:
        // perform actual change to selected records
        on_change_status: function(item,event,status) {
            var selRows = this.grid.getSelectionModel().getSelection();
            if (selRows.length > 0) {
    
                var requests = [];
                for (var i = 0, rec; rec = selRows[i]; i++){
                    requests.push({ id: selRows[i].data.id_request });
                }
                // ajax call to delete all id instead of multiple calls to store.remove
                Ext.Ajax.request({
                    method: 'POST',
                    url: 'index.php/requests/change_status/',
                    params  : {
                        ids: Ext.encode(requests), // list of requests
                        status: status
                    },
                    success: function() {
                        // observable catches errors
                    },
                    failure: function() {
                        alert('AJAX FAILURE: Unable to change selected requests');
                    }
                });
    
                // update view
                storeRequests.load();
    
            } else {
                alert('NOTICE: You must select a request to perform this action');
            }
        },
    Scott.

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Posts
    2
    Vote Rating
    0
    daviboysmith is on a distinguished road

      0  

    Default


    Hey Scott,


    Thank for your response. It has been a great help.


    Dave
    Last edited by daviboysmith; 30 Sep 2012 at 4:37 PM. Reason: revise

Thread Participants: 1

Tags for this Thread