javascript - ExtJS property grid reload after render -
i have property grid :
periods.each(function(record){ var temppropgrid = me.getview().add( { xtype:'propertygrid', width: 80, header: false, title: 'prop grid', //for reason headers not hiding, may need deal using css //hideheaders: true, enablecolumnresize: false, sortablecolumns: false, namecolumnwidth: 1, source: record.data, sourceconfig: { periodscrummaster: { editor: ext.create('ext.form.combobox', { tdcls: 'red', store: team, querymode: 'local', displayfield: 'personname', valuefield: 'personname', listeners: { 'expand' : function(combo) { var gridvalues = this.up('propertygrid').getsource(); combo.getstore().clearfilter(true); combo.getstore().addfilter({property: 'teamname', value: teamname}); combo.getstore().addfilter({property: 'periodname', value: gridvalues.periodname}); var totalfte = team.count(); console.log(totalfte); var teamstore = ext.getstore('personperiods'); console.log('store'); console.log(teamstore); }, }}), displayname: 'scrum master' }, },
that has render listener:
beforerender: function(){
debugger;
var gridvalues = this.getsource(); // console.log(record); //debugger; // filter periods period periods.filterby(function(record,id){ if(record.get("periodname") === gridvalues.periodname){ return true; }}); // filter teammembers period , team var view = this.up(); var vm = view.getviewmodel(); var store = vm.getstore('teammembers'); store.filterby(function(record,id){ if(record.get("periodname") === gridvalues.periodname) { return true; }}); //store.clearfilter(true); store.addfilter({property: 'teamname', value: teamname}); // ftes assigned team in period counting records var resourcedftes = store.count(); // here check record in periods store make sure data matches how many resourcedfte there update if required // super bad , need refactor periods.each(function(record,idx){ var value = record.get('resourcedfte'); if(value != resourcedftes){ record.set('resourcedfte',resourcedftes); record.commit(); vm.data.parentcontroller.saveparent(); }}); // need call save parent record updated when update above //clear can start fresh next period store.clearfilter(true); //periods.clearfilter(true);
basically there logic check if data correct/up date , if not updates it. works fine, data not loaded grid. have refresh after rendering grid load correctly.
is there way can call refresh or reload method on property grid load data again inside if statement?
if understand question, suggest programm store proxy returns whole changed record.
store parametered autoload
enabled?
(sorry can't (yet) comment)
Comments
Post a Comment