Dennis
Jun 11, 2020, 2:48 PM
Hello,
Copying from the following example:
https://examples5.ext.net/#/GridPanel/Editable/Editor_with_DirectMethod/
[DirectMethod(Namespace = "CompanyX")]
public void Edit(int id, string field, string oldValue, string newValue, object customer)
{
string message = "<b>Property:</b> {0}<br /><b>Field:</b> {1}<br /><b>Old Value:</b> {2}<br /><b>New Value:</b> {3}";
// Send Message...
X.Msg.Notify(new NotificationConfig()
{
Title = "Edit Record #" + id.ToString(),
Html = string.Format(message, id, field, oldValue, newValue),
Width = 250,
Height = 150
}).Show();
this.GridPanel1.GetStore().GetById(id).Commit();
}
As I understand - In the Edit function above the
this.GridPanel1.GetStore().GetById(id).Commit(); call is supposed to apply the changes within the Store object. How do I subscribe to the update event to have my code notified of the changes so that I could make updates in the underlying DB? What is the best way of doing that?
Thanks,
Dennis.
Copying from the following example:
https://examples5.ext.net/#/GridPanel/Editable/Editor_with_DirectMethod/
[DirectMethod(Namespace = "CompanyX")]
public void Edit(int id, string field, string oldValue, string newValue, object customer)
{
string message = "<b>Property:</b> {0}<br /><b>Field:</b> {1}<br /><b>Old Value:</b> {2}<br /><b>New Value:</b> {3}";
// Send Message...
X.Msg.Notify(new NotificationConfig()
{
Title = "Edit Record #" + id.ToString(),
Html = string.Format(message, id, field, oldValue, newValue),
Width = 250,
Height = 150
}).Show();
this.GridPanel1.GetStore().GetById(id).Commit();
}
As I understand - In the Edit function above the
this.GridPanel1.GetStore().GetById(id).Commit(); call is supposed to apply the changes within the Store object. How do I subscribe to the update event to have my code notified of the changes so that I could make updates in the underlying DB? What is the best way of doing that?
Thanks,
Dennis.