-1

I am using Primeng Datatable. Also using [(selection)] ="selectedRowItems" in <p-dataTable...> to multiple check/uncheck etc. I'd like to modify this datatable checkbox-column in such a way that if some certain condition is given then the column will be disabled else enabled.

In short: Is there any boolean property like [disabled] available for Primeng Datatable to disable/enable a column?

More clarification: I would like to display some Item details in datatable. If their parent Id's status is 'Deployed', then the checkbox column will be disabled. But if the parent Id's status is not 'deployed' then the checkbox column will be active and we can add/delete/modify items in datatable. This parent Id, or the status is not part of data-table. Only the item details shown.

SamCodes
  • 384
  • 4
  • 17
  • It's not clear... Do you want a column or the row containing the checkbox to be disabled ? – Antikhippe Mar 05 '18 at 18:30
  • There's a column containing checkboxes, including the header. I'd like that checkbox containing column to be disabled for a particular output. – SamCodes Mar 05 '18 at 18:33
  • Clarification added. – SamCodes Mar 05 '18 at 18:40
  • `p-datatable` is deprecated and the feature you want is not already available (and will never I guess). But you can do it via `pSelectableRowDisabled` property of new `p-table` component... – Antikhippe Mar 05 '18 at 19:00

1 Answers1

1

in .html:

[selectionMode] = "multipleOrnull"

in .ts:

if(deployed){
   multipleOrnull = "";
} 
else {
    multipleOrnull = "multiple";
}
SamCodes
  • 384
  • 4
  • 17