Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: form.updateRecord wont work

  1. #11
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Answers
    501
    Vote Rating
    247
      0  

    Default

    I see.
    After the grid's store is updated the record you have loaded to the form (which owns the radar chart) no longer exists in the store used by the grid and column chart. To update those on a form edit you'll need to find the record in the store matching the one up just updated and update it as well.

    Try with this:
    Code:
    listeners: {
        // buffer so we don't refire while the user is still typing
        buffer: 200,
        change: function(field, newValue, oldValue, listener) {
            if (selectedRec && form) {
                if (newValue > field.maxValue) {
                    field.setValue(field.maxValue);
                } else {
                    if (form.isValid()) {
                        form.updateRecord(selectedRec);
                        updateRadarChart(selectedRec);
                        var index = ds.find('company', selectedRec.get('company'));
                        var values = form.getValues();
                        ds.getAt(index).set(values);
                    }
                }
            }
        }
    }

  2. #12
    Sencha User
    Join Date
    Jan 2008
    Posts
    211
    Answers
    3
    Vote Rating
    0
      0  

    Default

    thank you thank you thank you thank you thank you thank you thank you thank you

    that works realy cool!

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •