Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
530
IGX-GRID CellEdit UpdateCell
posted

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

Parents
No Data
Reply
  • 740
    Offline posted

    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 Ivanova
    Entry Level Software Developer

Children