Ngx-datatable: Make row uncheckable

Created on 19 Sep 2017  路  7Comments  路  Source: swimlane/ngx-datatable

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[ x ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

When using checkboxes, is it possible to make one particular row uncheckable (e.g. a row having a certain value on a certain column) ?

If not, I'd like to request this feature.

All 7 comments

@ShinDarth have you taken a look at selectCheck?

@wizarrc it is not clear to me what it exactly does:

A boolean/function you can use to check whether you want to select a particular row based on a criteria.

I tried it and apparently doesn't work, probably I'm not using it properly.

I guess that in my case I need something like:

A boolean/function you can use to check whether you can select a particular row based on a criteria.

@wizarrc what is it not clear?

What I wanted to say is: I need a way to make some rows uncheckable, according to their data, and in that case I'd like to not show the checkbox at all for those rows.

basically there are 2 problems with using selectCheck:

1) it doesn't affect the "checkAll" button
2) it still show the checkbox for the row which is uncheckable

@ShinDarth thanks for the clarification! I'll keep that in mind. Sounds like that feature could be useful. Do you have any ideas on how you'd like the feature to added from an API perspective?

@wizarrc I guess it can be analogue to the selectCheck API. So something like displayCheck which, if present, displays the data only when its callback evaluates to true.

Thanks for your collaboration!

Hi @wizarrc selectCheck option is not working properly if selectionType=checkbox.
Well, the rows turns unselectable, but the checkbox still enabled. I think it is a bug

Was this page helpful?
0 / 5 - 0 ratings