Skip to content

Commit

Permalink
docs(grid): editor template receives a copy of the model
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-bratanov committed Mar 8, 2020
1 parent 241574a commit b8fe2ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/grid/templates.md
Expand Up @@ -148,7 +148,7 @@ Render the entire row with your own code and logic

The column's `EditTemplate` defines the inline template or component that will be rendered when the user is [editing]({%slug components/grid/overview%}#editing) the field.

You can data bind components in it to the current context, which is an instance of the model the grid is bound to. You will need a global variable that is also an instance of the model to store those changes.
You can data bind components in it to the current context, which is an instance of the model the grid is bound to. You will need a global variable that is also an instance of the model to store those changes. The model the template receives is a copy of the original model, so that changes can be cancelled (the `Cancel` command).

If you need to perform logic more complex than simple data binding, use the change event of the custom editor component to perform it. You can also consider using a [custom edit form](https://demos.telerik.com/blazor-ui/grid/editing-custom-form).

Expand Down

0 comments on commit b8fe2ad

Please sign in to comment.