DataTable disabledSelection property for multi selection
I'm submitting a ... (check one with "x")
[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports)
Current behavior When multiple selection mode (checkbox) is set for databale, checkbox appears for all the rows.
Expected behavior When multiple selection mode (checkbox) is set for databale, there should be an option to disable/hide checkbox for some rows depending on some condition.
Minimal reproduction of the problem with instructions 'Optimus Prime' has already requested to raise a request for this. http://forum.primefaces.org/viewtopic.php?uid=93199&f=35&t=47101&start=0
What is the motivation / use case for changing the behavior? Pelase refer below scenario: We have few number of authors we are showing in datatable. The first author is always the one who is submitting the form and rest of them are the co-authors. We have a functionality where user can select multiple authors (datatable rows) and move them up and down (basically rearrange them) as per their importance. But user cannot move up or down the main author who is first in datatable and so he should not be able to select the first author. This means we don't need checkox for that row.
Please tell us about your environment:
-
Angular version: 2.1.X
-
PrimeNG version: 1.1.1
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
-
Node (for AoT issues):
node --version=
Any update on this, PrimeNg team ?
Still nothing?
Does anyone know somthing new to this?
Not sure how we can expose this, Current workaround could be using rowStyleClass and hiding the checkbox manually;
rowStyleClass="'test'"
.test .ui-selection-column .ui-chkbox { display: none; }
Still thinking about how we can do it easier.
@cagataycivici How do we add .test conditionally to the row where we want to hide checkbox?
@cagataycivici Any update on this?
I am currently looking for something similar. Although in my case I have a multiple selection datatable where I need to display a number of rows but also need to disable selection for some of them (not checkboxes but normal selection).
p-dataTable is deprecated and will be removed in favor of the new p-table (aka TurboTable) of 5.1.0 so closing the issue. Please try the new p-table once 5.1.0 is released.
Is this issue reolved? Is that support is available for disabling the particular row in multiple mode selection?