Hi Emad,
Thank you for contacting Syncfusion support.
Based on the shared information we have checked your requirement of “Accessing field values after DataForm commit”. DataForm DataObject will hold the committed values of each field, you can get the entire class or individual field values from DataObject of DataForm.
Please refer the following code example for the same,
[C#]
private void OnCommit(object dataForm)
{
var dataFormLayout = dataForm as Syncfusion.XForms.DataForm.SfDataForm;
var isValid = dataFormLayout.Validate();
dataFormLayout.Commit();
//Gets value of model class
var model = dataFormLayout.DataObject;
//Gets individual field values
var firstName = (dataFormLayout.DataObject as ContactsInfo).FirstName;
var lastName = (dataFormLayout.DataObject as ContactsInfo).LastName;
var email = (dataFormLayout.DataObject as ContactsInfo).Email;
var contactNumber = (dataFormLayout.DataObject as ContactsInfo).ContactNumber;
} |
We have prepared a sample based on your requirement,
We hope this helps. Please let us know if you would require any further assistance.
Regards,
Karthik Raja A