I’m converting the array to JSON when I save and all that’s working fine.
But how can I retrieve the value when I edited the row within the CMP. Need to changed the value some how when the window opens. I’ve tried using the value property but this only works for a default value so no good when updating.
As you provide very little information about your code, it is difficult to give sound advice.
But assuming you use setValues() to set the values of the window’s form, something like this might work:
this.myUpdateWindow.setValues(this.menu.record);
var times_obj = Ext.util.JSON.decode(this.menu.record.times);
this.myUpdateWindow.fp.getForm().findField('times[12:00]').setValue(times_obj['12:10']);
this.myUpdateWindow.fp.getForm().findField('times[12:15]').setValue(times_obj['12:15']);
That’s probably not the most elegant solution and maybe it’s a better idea to adjust the getlist/get processor to return every value in JSON as a separate field.