how to submit changed invisible data in a custom action?

27 views
Skip to first unread message

doug

unread,
May 14, 2013, 4:12:15 AM5/14/13
to net...@googlegroups.com
Hi,  the issue is that a grid contains invisible columns, if the invisible field is changed in a custom action, how to submit the changed record (make a remote updating operation)? Thanks.

The code:

    column :state do |c|
      #c.hidden = true
      c.width = 0   # hide this column
    end

  // custom action handler
  onSubmitData: function() {
    Ext.Msg.confirm(this.i18n.confirmation, this.i18n.areYouSure, function(btn){
      if (btn == 'yes') {
        var ids = [];
        this.getSelectionModel().selected.each(function(r){
          if (r.isNew) {
            // skip
          } else {
            console.log(r.getData());
            r.set('state', '2');   // set value to hidden field
            //this.getStore().sync();        // Q1: It seems calling sync method don't work.
            console.log(this.serverUpdate);  // Q2: serverUpdate is undefined
          }
        }, this);
      }
    }, this);
  },

doug

unread,
May 16, 2013, 8:21:22 PM5/16/13
to net...@googlegroups.com
Resolved.  Call  "this.onApply()" instead.
Reply all
Reply to author
Forward
0 new messages