Column

Guten Tag , 

ich benutze Syncfusion für Angular und habe ein Problem mit [columns] = 'orderColumns' und zwar ich will anstatt eine statice ' orderColumns' eine Variable definieren , so kann man bei beispielsweise ButtonClick das Inhalt von columns ändern und column mit verschiedenen Werte angezeigt wird.

Für eine Antwort wäre ich sehr Dankbar:-)


Viele Grüsse

Mohammad von RpDoc GmbH


1 Reply

PS Pavithra Subramaniyam Syncfusion Team October 19, 2022 05:01 PM UTC

Hi Mohammad Abbasi,


Thanks for contacting Syncfusion support.


From your query, we understand that you want to update the Grid columns dynamically. If yes, you can achieve your requirement by setting the grid.columns property and call the “refreshColumns” method. Please refer to the below code example and the sample link for more information.


 click() {

    this.grid.columns = newColumns;

    this.grid.refreshColumns();

  }

 


https://stackblitz.com/edit/angular-yxy8nz?file=app.component.ts


Please get back to us if you need further assistance on this.


Regards,

Pavithra S


Loader.
Up arrow icon