How to show per sheet quitguard status in SheetsSheet? #2429
-
In #2136 (comment). @midichef showed us how to add a column to the SheetsSheet to show the query for a QuerySheet. Is there a similar trick to do this with showing a sheet's options? I'm interested in the quitguard option, but there might be other options that would be helpful. I started with the example for query, but this appears to only show the quitguard value for the SheetsSheet. SheetsSheet.columns.append(
Column('quitguard',
getter=lambda c,r: r.options.get('quitguard', False),
setter=lambda c,r,v: r.options.set('quitguard', v)
)
) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I read the original issue again and read the source code. If you only want to see the value, you can add a column: If you also want to update the option you need a snippet like: SheetsSheet.columns.append(
Column('quitguard',
getter=lambda c,r: r.options.quitguard,
setter=lambda c,r,v: setattr(r.options, 'quitguard', bool(v))
)
) |
Beta Was this translation helpful? Give feedback.
I read the original issue again and read the source code.
If you only want to see the value, you can add a column:
=row.options.quitguard
If you also want to update the option you need a snippet like: