Table - ContextMenu - Add\Remove items dynamically

UI Components for Angular
Post Reply
sunnyPrime
Posts: 1
Joined: 21 Sep 2018, 07:59

21 Sep 2018, 08:21

Hello,
I have a requirement where in the items in the context menu has to change according values in the table. Eg: Consider the table has four rows and one of the column - say col-4 contains a numeric value.
a. If the value of col4 > 0 then I need to show 3 items values in context menu.
b. If the col4 = 0 then I need to show 5 items values in context menu.
c. If the col4 < 0 then I need to show 4 items values in context menu.
The value of col4 has to be considered for each of the row before the context menu is displayed\rendered. There is also a requirement to change the value of menu label based on other column value but within the col4 condition.

So please suggest if there any event that can be used to configure the menu dynamically. Also since this to be applied for every row - the table data load time must not be affected.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests