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
370
IgxGridComponent add dynamic column
posted

Hi,

I want to add row action column to IgxGridComponent before it is rendered, my requirement is not to use ngFor.

I have added my custom directive on <igx-grid> which will be adding this dynamic column.

Thanks in Advance.

I tried:

let actionColumn = new IgxColumnComponent(undefined, this.gridRef.cdr);
actionColumn.header = "Actions";
actionColumn.field = "Actions";
this.gridRef.columns.push(actionColumn);
Parents
  • 5105
    Offline posted

    Hi Shahab,

    You need to use *ngFor in order to do this. If you can provide your component code and your template, I can assist you to move your columns configuration to a collection you can *ngFor on top of.

    Thank you for using Ignite UI for Angular!

    Sincerely,

    Konstantin Dinev

Reply Children