Oct 12, 2012, 10:22 AM
How to check properties(isValid, phantom, modified) and compare updated record with previous record on server side
Hello this is my first project whit EXT.NET
I try to modify AutoSave Exemple
On the HandleChanges method, i want to get the Record object to check 'isValid()' 'Phantom' and 'modified' properties
With e.DataHandler.ObjectData<TestPerson>() i can find the new values but not the previous
How can i acces to record on Store or on gridPanel and get these values on server side?
Thanks.
I try to modify AutoSave Exemple
On the HandleChanges method, i want to get the Record object to check 'isValid()' 'Phantom' and 'modified' properties
With e.DataHandler.ObjectData<TestPerson>() i can find the new values but not the previous
How can i acces to record on Store or on gridPanel and get these values on server side?
Thanks.
protected void HandleChanges(object sender, BeforeStoreChangedEventArgs e)
{
ChangeRecords<TestPerson> persons = e.DataHandler.ObjectData<TestPerson>();
foreach (TestPerson created in persons.Created)
{
//BDDCreate..
}
foreach (TestPerson deleted in persons.Deleted)
{
//BddDelete
}
foreach (TestPerson updated in persons.Updated)
{
//BDDUpdate
}
e.Cancel = true;
}
Last edited by smaoui; Oct 15, 2012 at 8:18 AM.
Reason: Clarifcation