We have below controls on our screen:
- Form: frmEmployee
- Add Employee Button: btnAddEmployee
- Edit Employee Button: btnEditEmployee
In our Form, we have details for Employees like EmployeeID, EmployeeName, EmployeeAddress and EmployeePhone.
When user clicks on btnAddEmployee, frmEmployee should be New Form and all Data Cards should be editable.
When user clicks on btnEditEmployee, frmEmployee should be Edit Form and all Data Cards should be editable except EmployeeID.
EmployeeID DataCard DisplayMode= If( frmEmployee.Mode = FormMode.Edit, DisplayMode.View, DisplayMode.Edit )