DT icon indicating copy to clipboard operation
DT copied to clipboard

Disabling editable table by row (and not just by column)

Open ajo1993 opened this issue 1 year ago • 1 comments

Hello,

I was wondering whether it is possible to disable editing by row indices and not just column indices. I would like to block editing on some columns and then also on certain rows. I was thinking of an option such as:

example: datatable(talbe, options = list(scrollX=TRUE,pagelenth=10,stateSave = TRUE), editable = list(target = 'cell', disable=list(columns=c(1,4), rows=c(1:5))).

Is this possible to do somehow in R without complex Java? I saw this post :https://stackoverflow.com/questions/73157285/shiny-dt-lock-some-columns-and-rows-for-editing but even in the latest DT version I don't get the "rows" option in "disabled".

Thank you


By filing an issue to this repo, I promise that

  • [Yes] I have fully read the issue guide at https://yihui.org/issue/.
  • [Yes] I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('DT'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/DT').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • [Yes] I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

ajo1993 avatar Jan 23 '24 22:01 ajo1993

+1 to this feature

sw-jakobgepp avatar Aug 16 '24 15:08 sw-jakobgepp