View source: R/grid-selection.R
| grid_click | R Documentation | 
Click event (in shiny)
grid_click(grid, inputId)
| grid | A table created with  | 
| inputId | The  | 
A datagrid htmlwidget.
if (interactive()) {
  library(shiny)
  library(toastui)
  ui <- fluidPage(
    tags$h2("datagrid click"),
    datagridOutput("grid"),
    verbatimTextOutput("res")
  )
  server <- function(input, output, session) {
    df <- data.frame(
      index = 1:12,
      month = month.name,
      letters = letters[1:12]
    )
    output$grid <- renderDatagrid({
      datagrid(df) %>%
        grid_click(
          inputId = "click"
        )
    })
    output$res <- renderPrint({
      input$click
    })
  }
  shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.