Change Display Mode of Data Card as per Form Mode

Scenario

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
                      )
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s