I am using Angular 11 and current Ignite UI.
I have a grid which has columns users can edit (name, active, type, etc.) and other columns which they cannot (parameters changed in other screens, audit columns, etc.).
I want to know how to programmatically modify the "updated by" and "updated date" columns when rowEditing is finished (updates in the grid since it will automatically update in the back-end via persisting other column changes to the DB).
I don't know if it makes more sense to use a custom template for those columns or by using the (rowEditDone) process to somehow persist the expected data to those audit columns.
Can something be done about Jenny?
This wasn't the first thread of mine that she's posted on and it's highly inappropriate for working environments. It kind of makes you guys look bad that you allow it to keep happening.
Hello Chris,
I am glad that you managed to achieve your requirement.
Thank you for using Infragistics components.
Much simpler than I expected. Thanks!
Also, I discovered that it updates without having to use the spread operator on the dataset, at least in my grid.
Thank you for posting in our community.
What I can suggest for achieving your requirement is handling the rowEditDone event and then to manually change values of the UpdatedBy and UpdatedDate properties of the current row object:
public rowEditDoneHandler(args: IGridEditDoneEventArgs) {
const currRowIndex = this.data.indexOf(args.rowData);
this.data[currRowIndex].UpdatedBy = this.username || 'Anonymous';
this.data[currRowIndex].UpdatedDate = new Date();
this.data = [...this.data]; }
I created a small sample illustrating my suggestion, which can be found here. Please test it on your side and let me know whether you find it helpful.
Please let me know if you need any further assistance.
Regards,
Viktor Kombov
Entry Level Software Developer
Infragistics, Inc.