Relative Content

Tag Archive for jqueryangularprimengp-table

I Need to Add ‘Select All’ Radio Button functionality in the Table Header of 3 Columns using p-table and p-radioButtons. Angular v16 and PrimeNG –

I need to build a function that checks all radio buttons (p-radioButton) in a single column contained in a p-table. I will have a ‘select all’ radio button in the table header for three columns consisting of radio buttons. The table header radio button will be mutually exclusive for the three columns of the p-table. When clicking column 1 ‘select all’ radio button, it selects all radio buttons in column 1 and unselects all previously selected radio buttons in column 2 and column 3. When clicking column 2 ‘select all’ radio button, it selects all radio buttons in column 2 and unselects all previously selected radio buttons in column 1 and column 3. When clicking column 3 ‘select all’ radio button, it selects all radio buttons in column 3 and unselects all previously selected radio buttons in column 1 and column 2. I have jQuery installed in my Angular app, so I can use it or plain vanilla JavaScript. I already have functionality to make each table row mutually exclusive for the three radio button columns so I expect that the ‘select all’ radio button when selected will inherit the same functionality for each table row. Can anyone help me achieve this functionality using the PrimeNG radio buttons (p-radioButton) and p-table? Thanks so much. Jeff