Site icon Coding Faster

PrimeNg Context Menu Example

Today, I want to talk about PrimeNg ContextMenu. Context Menu property is very usefull for PrimeNg table  operations. Let’s make a PrimeNg Context Menu Example. First we must prepare the html code below.

We connect the table to contextmenu with  [contextMenu]=”cm” in p-table.  In this example, our goal is to change the headers  with right click.  We will add this code to typescript file.

We can write the event code to the “this.selectHeaderMenu “. Then we can change the header in the function excelChoose. That’s just all. It is very easy and simple to change headers in PrimeNg ContextMenu with this example.  If you want to see another post about PrimeNg table, have a look to this PrimeNg Table

Exit mobile version