[英]How to update a row in table with angular-material?
I'm build an app with angular
and C#
.我正在使用angular
和C#
构建一个应用程序。 for styling I'm using angular-material
.对于造型,我正在使用angular-material
。
I have a report component which display a table with data.我有一个报告组件,它显示一个包含数据的表格。
I want to support update and delete actions.我想支持更新和删除操作。 I have services for delete and update.我有删除和更新的服务。
What is the easiest way to do that?最简单的方法是什么?
Here are two examples about removing specific rows from the mat-table:以下是关于从 mat-table 中删除特定行的两个示例:
Remove action for each row: https://stackblitz.com/edit/angular-mat-table-remove-row-and-adapters?file=src%2Fapp%2Fapp.component.html删除每行的操作: https://stackblitz.com/edit/angular-mat-table-remove-row-and-adapters?file=src%2Fapp%2Fapp.component.html
Choose one or more rows to remove in once https://stackblitz.com/edit/delete-rows-mat-table?file=app%2Ftable-selection-example.ts一次选择要删除的一行或多行https://stackblitz.com/edit/delete-rows-mat-table?file=app%2Ftable-selection-example.ts
You can use those examples to implement the edit action in the same way as the remove action.您可以使用这些示例以与删除操作相同的方式实现编辑操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.