Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

131
Visualizações
Shiny DT lock some columns AND rows for editing

What I want is that only certain cells are editable by the user, for example in the iris dataset I want the first 3 rows to be locked and also the second and the third column.

I have found the same question here on SO (Shiny datatable mode editable - restrict specific columns AND ROWS), however unfortunately the provided solution does not work (as there only the columns get locked after running the code). Here is a minimal reprex.

as you can see I wrote both the respective columns and rows in the argument, however only the columns got locked.

library(shiny)

library(DT)


ui <- fluidPage(
  DTOutput("table")
)

dat <- iris[1:10, ]

server <- function(input, output, session){
  
  output$table <- renderDT({
    datatable(dat, editable = list(target='cell', disable = list(columns = c(2:3), rows=c(1:3) )))
  }, server = FALSE)
  

  
}

shinyApp(ui, server)
about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda