PDA

View Full Version : update edited row



tmchedlishvili
5 Jun 2013, 7:53 PM
hello friend
may be my problem is very easy for you but i can't afford..
i'm getting datas from row and showing in other panel's fields
my goal is edit this datas and show edited datas in grid ,please give me some advice, i know that it needs commit() function but..


mu code :



var selModel = persongrid.getSelectionModel();
var selectedRecords = selModel.getSelection();


console.log(selectedRecords[0].data)
me.activeRecord = selectedRecords;


a=selectedRecords[0].data;
var user = Ext.create('SFG.model.Person',a );
me.getForm().loadRecord(user);






but it needs continue please help me..

slemmon
7 Jun 2013, 10:32 AM
Are you wanting to take a record from a store and load it to a form and have changes in that form reflected back in the source record?

team.avesta
8 Jun 2013, 12:16 AM
Your grid and form should have same store so that any changes made in form will be reflected in grid panel.