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

262
Visualizações
How to enable rowselection across pages, filtering, and search in a DT (DataTable) built in R-markdown?

I have an interesting question. How can I get the effect where I can select rows in a DT (DataTable) built-in R-markdown across pages and filtering. This would be really helpful as selectedrows across filter, pages and searches in a large dataframe can then be easily exported with the integrated buttons to for example CSV. I need the javacript below translated into R.

Here it is done in Javascript; https://datatables.net/examples/server_side/select_rows.html

Here is my DT built in R-markdown:

#DT table of departures with detailed filtering
Customer_card_DT <- DT:: datatable(Customercard_all,
               #container = sketch,
               filter = "top", #adds filter options to each column (filter can be "top" or "bottom")
               class = "cell-border stripe hover order-column", #adds some basic styling to the table and reducing white-space with compact, highlight on mouseover with hover, and hightlight the column that is used for filtering with order-column
               #caption = "Customer Card",
               rownames = F, #Removing row name indexes
               editable = TRUE, #allows the table to be edited in the final output
                #colnamnes code below does nothing after adding colnames in container
              # colnames = c("PO reg", "Art", "Product", "QTY", "Destination", "ETA", "Days left", "Tracking", "Change in ETA",
               #             "Type", "Containers", "Purch.value"), #changes column names in the final output
               extensions = c("Buttons", "KeyTable", "Select"), #adds buttons at the top of the table which allow the user to export the data
               selection = 'none',
               options = list(
               #Use the code below to hide all columns that are basicly default in a SPO upload. It shows up                 on export anyways.
               #columnDefs = list(list(visible=FALSE, targets=c(13,14))),
               pageLength = 30,
               autoWidth = TRUE,
               keys = TRUE, #For KeyTable entension which creates border of current cell and that enables excel style navigation between cells
               dom = 'Bfrtip', #For buttons
               select = list(style = 'os', items = 'row'),
               buttons = c('copy', 'csv', 'excel', 'pdf', 'print', I('colvis'), "selectCells", "selectRows", "selectNone"))) #adds buttons at the top of the table which allow the user to access different functionalities

Customer_card_DT

Thanks very much in advance!

about 4 years ago · Juan Pablo Isaza
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