Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!