michbak
25 Aug 2008, 9:55 AM
Hi,
I have a grid which contains three columns (A, B, C). I want B and C to be filled automatically when user enters value to A column. It is working fine now, but only when number of rows is greater than 1. When there is only one row, after setting B and C value, A exits editing mode and looses focus. I've found that the problem is caused by the following code in ext-all-debug.js:
refreshRow : function(record){
if(this.ds.getCount()==1){
this.refresh();
}else{
this.isUpdating = true;
Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments);
this.isUpdating = false;
}
},
When I remove the condition and leave only:
refreshRow : function(record){
this.isUpdating = true;
Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments);
this.isUpdating = false;
},
...then it works correctly. The question is why refreshRow() function looks as it looks? What was the purpose of this condition?
Best regards,
Michal.
I have a grid which contains three columns (A, B, C). I want B and C to be filled automatically when user enters value to A column. It is working fine now, but only when number of rows is greater than 1. When there is only one row, after setting B and C value, A exits editing mode and looses focus. I've found that the problem is caused by the following code in ext-all-debug.js:
refreshRow : function(record){
if(this.ds.getCount()==1){
this.refresh();
}else{
this.isUpdating = true;
Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments);
this.isUpdating = false;
}
},
When I remove the condition and leave only:
refreshRow : function(record){
this.isUpdating = true;
Ext.grid.GroupingView.superclass.refreshRow.apply(this, arguments);
this.isUpdating = false;
},
...then it works correctly. The question is why refreshRow() function looks as it looks? What was the purpose of this condition?
Best regards,
Michal.