Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove row index column? #53

Open
jacob-lester opened this issue Sep 5, 2018 · 1 comment
Open

How to remove row index column? #53

jacob-lester opened this issue Sep 5, 2018 · 1 comment

Comments

@jacob-lester
Copy link

jacob-lester commented Sep 5, 2018

Can't figure out how to remove the first column from the grid that has the row indexes. There is no label for this column, so I cannot access it programmatically using colOpts.

library(shiny)
library(RagGrid)

ui <- shinyUI(fluidPage(
  title = 'Use the RagGrid package in shiny',
  fluidRow(
    column(2),
    column(8, RagGrid::RagGridOutput('tbl1')),
    column(2)
  )
))

server <- shinyServer(function(input, output, session) {
  output$tbl1 <- renderRagGrid(aggrid(iris))
})

shinyApp(ui = ui, server = server)

Example here

@lelouch77
Copy link
Contributor

lelouch77 commented Sep 6, 2018

Hi @jacob-lester ,
You can hide it using onGridReady callback function ...

library(htmlwidgets)
library(RagGrid)

 aggrid(iris,options=list("onGridReady"=JS("function(event) { event.api.columnController.setColumnVisible('rowHeaders',false) }")))

Thanks for pointing it out, we will add an option for it in next release..

praveenn77 pushed a commit to lelouch77/RagGrid that referenced this issue Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants