We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9710
    • 24 Posts
    Hi,

    Can someone tell me how to change saveParams during runtime?
    I want so send an additional parameter which depends on the current selected value of a combobox..

    Thank you!
      • 9710
      • 24 Posts
      anyone?

      I wonder why there is no setSaveParams() method.

      Or is there any other method to send custom params with inline editing?
        • 4172
        • 5,888 Posts
        which grid? what do you save, the complete grid? one record? how do you save it?
        we need more details. ..... and perhaps a bit Code, from what you are trying.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 9710
          • 24 Posts
          Thanks for your reply.

            4         Ext.applyIf(config,{
          [...]
           12         ,autosave: true
           13         ,save_action: 'mgr/test/inline_update'
           14         ,saveParams: { area: 'default' }  // set other value if combobox changes
          


           20         ,columns: [this.sm,
           21         {
           22             header: 'Position'
           23             ,dataIndex: 'position'
           24             ,sortable: true
           25             ,width: 100
           26             ,editor: { xtype: 'textfield', allowBlank: false }
           27             ,hidden: true
           28         },{
          


          I’m only trying to save one record with the inline editing feature of a modext grid (that one -> autosave) which actually is working. But I need to set a saveParam (area) which tells the processor which value is selected in a combobox.

          My problem is that I don’t know how to do so in the select-listener.
            • 4172
            • 5,888 Posts
            say you have a listener for your dropdown like this:


            					listeners: {
            						'select': {
            							fn: this.changeArea,
            							scope: this
            						}
            					}



            I think you can try:


            	,changeArea: function(cb,nv,ov) {
                   this.config.saveParams = { area: region:cb.getValue()};
                   }



              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 9710
              • 24 Posts
              It’s working, thank you very much!

              But preventSaveRefresh is being ignored. I added
              ,preventSaveRefresh: 0
              

              to force a reload (and remote resort) of the grid - but it’s not working :’(

              Do you know how to achieve this?