ipyregulartable icon indicating copy to clipboard operation
ipyregulartable copied to clipboard

Readonly pandas dataframe grid

Open gbrault opened this issue 4 years ago • 0 comments

Thanks for this very good component could be helpful to add an example of read-only grid.

Here is a skeleton:

query = ""  # ...
engine = None #...
description = pd.read_sql_query(query, engine) # add some more context
class DataFrameModel_noedit(rt.datamodel.pandas.DataFrameDataModel):
    def editable(self, x, y):
        return False
    
w1 = rt.RegularTableWidget()
w1.datamodel = DataFrameModel_noedit(description)
w1

gbrault avatar Sep 21 '21 18:09 gbrault