We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
update_cell
Currently the DataTable will only raise a CellDoesNotExist error if the row key does not exist, but not if the column key does not exist.
CellDoesNotExist
Here's a simple example which also logs the table _data:
_data
from textual.app import App, ComposeResult from textual.widgets import DataTable, RichLog class TableApp(App): CSS = """ DataTable { height: 1fr; border: double $primary; } RichLog { height: 1fr; border: double $primary; } """ def compose(self) -> ComposeResult: yield DataTable() yield RichLog() def on_mount(self) -> None: table = app.query_one(DataTable) table.border_title = "Table View" table.add_column("Column1", key="C1") table.add_row("TargetValue", key="R1") log = self.query_one(RichLog) log.border_title = "Table Data" log.write("DataTable._data = ") log.write(table._data) def key_u(self) -> None: table = self.query_one(DataTable) table.update_cell("R1", "INVALID_COLUMN", "New Value") log = self.query_one(RichLog) log.write("\nDataTable._data = ") log.write(table._data) app = TableApp() if __name__ == "__main__": app.run()
The text was updated successfully, but these errors were encountered:
We found the following entries in the FAQ which you may find helpful:
Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.
This is an automated reply, generated by FAQtory
Sorry, something went wrong.
Don't forget to star the repository!
Follow @textualizeio for Textual updates.
Successfully merging a pull request may close this issue.
Currently the DataTable will only raise a
CellDoesNotExist
error if the row key does not exist, but not if the column key does not exist.Here's a simple example which also logs the table
_data
:The text was updated successfully, but these errors were encountered: