How to get selected rows from qgrid in pyshiny

I'm using qgrid with pyshiny and I would like to detect what rows are selected in qgrid when the user presses a button:

from shiny import App, render, ui, reactive
import pandas as pd
from shinywidgets import *
import qgrid

app_ui = ui.page_fluid(
    ui.input_action_button("doSomething", "Do Something")

def server(input, output, session):
    from import get_data_yahoo
    spy = get_data_yahoo(

    def mytable():
        return qgrid.show_grid(spy)

    def doSomething():
        #do something with selected rows

app = App(app_ui, server)

How do I get the selected rows from mytable?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.