Adding Buttons in Nested ViewModels
No edit summary
No edit summary
Line 23: Line 23:


  Note: Do not link the created ViewModel action to the action column. The button/action column will work automatically and execute the ViewModel action expression.
  Note: Do not link the created ViewModel action to the action column. The button/action column will work automatically and execute the ViewModel action expression.
[[File:2024-06-03 20h15 22.png|alt=How to add Button in Nested View Model|left|thumb|1039x1039px]]

Revision as of 17:27, 3 June 2024

Adding Buttons in Nested View Models

An action column within a ViewModel is used for adding a button. There are two ways to set execution expressions in a nested ViewModel button;

  • Using class actions (recommended)
  • Using ViewModel actions

Using Class Action

Adding a class action requires root on a view model.

  1. Add action column in ViewModel.
  2. Go to ViewModel Actions and click Class Action to create New Class Action.
  3. DoubleClick on the created Class Action to open actions editor menu where you can edit class action name and execute expression for action.
  4. Go to the ViewModel and click on the new action column to show its settings on their right where you can link the column to the class action.

Using ViewModel Action

For this option to work action column name must be the same as the ViewModel Action name.

  1. Add action column in ViewModel.
  2. Go to ViewModel Actions and click ViewModel Action to create a new ViewModel Action.
  3. DoubleClick on the created ViewModel Action to open actions editor menu where you can edit ViewModel action name and execute expression for action.
  4. Set a name that will be the same as the name of the action column.
  5. Go back to the ViewModel and click on the new action column to show its settings on their right. Make sure the Name for the column is the same as the one for the new ViewModel action.
Note: Do not link the created ViewModel action to the action column. The button/action column will work automatically and execute the ViewModel action expression.
How to add Button in Nested View Model
This page was edited 52 days ago on 07/29/2024. What links here