Hi Saki!
I'm using the recordForm together with a directstore and had to change the updateRecord so it works with the directstore. If you like it feel free to add it to the recordForm so everybody can use it with a directgrid with a writer.
The problem is you change one field at a time, so the directstore writer sends multiple request (which get's exponentially more through an ext.direct "bug" or planning error). To just get one request I use a transaction, so here's my updateRecord:
Code:
,updateRecord:function() {
var record = this.record;
// because of the directStore this has to be a transaction (for only one update)
record.beginEdit();
// loop through form fields and update underlying record
this.form.getForm().items.each(function(item, i) {
record.set(item.name, item.getValue());
}, this);
// end transaction
record.endEdit();
this.afterUpdateRecord(this.record);
} // eo function updateRecord
And a second thing where I'm not sure if my solution is the right one (but it works).
When I open a recordForm window (first time, so it gets created), then scroll and open another one (second time, so it just gets shown) the window is not in the middle of the page and can be quite off the page. So what i did was going to here:
Code:
,show:function(record, animEl) {
// lazy create window
if(!this.window) {
this.window = this.getPanel();
}
and changing it to:
Code:
,show:function(record, animEl) {
// lazy create window
if(!this.window) {
this.window = this.getPanel();
} else {
// center it, because the viewport can have changed
this.window.center();
}
best regards
Roland
PS: What are the dependecies for the recordForm? Do I need anything exept the rowActions (if I want to use it inside the grid)?