Hello,I have a misunderstanding regarding the use of updateCell in my igx-grid.I have this error message:
However I have specified a primarykey. I don't understand why I have the error message in the cellEdit method.
Have you an idea ?
best regards,
Philippe DUFEIL
Hello Philippe,
Thank you for posting in our community!
I have been looking into your question and after reviewing the provided snippet from the console log, what I could say is that the most common reason for receiving such an error is if the selector provided in the ViewChild is not equal to the one assigned to the IgxGrid in the html file.
For example:
// component.html<igx-grid #grid [data]="data" [autoGenerate]="true"></igx-grid>
// component.ts@ViewChild('grid1', { read: IgxGridComponent, static: true }) public grid!: IgxGridComponent;
Additionally, regarding the updateCell method, I am under the impression that you require when a cell is edited in a specific column, this value should be applied to another cell in the respective row as well. If my impression is correct, I believe that you will find this small sample, which I have prepared for you quite helpful.
Please test this approach on your side and let me know if you need any further assistance regarding this matter.
Looking forward to your reply.
Sincerely,Riva IvanovaEntry Level Software Developer
Hello Riva,Thank you for the example that works well. Nevertheless, the problem persists.After a long search, I found the source of the problem.
Here is the context in which I was able to reproduce the error:My grid is in a <igx-tabs> that I condition by using in the html code *ngIf
I don't understand why using a *ngIf in a <igx-tab-item> generates an error with the <igx-grid> updateCell.Do you have an alternative to this problem?
Thanks for your help.
Best regards,