ragardner / tksheet

Python tkinter table widget for displaying tabular data
https://pypi.org/project/tksheet/
MIT License
408 stars 50 forks source link

Currently selected cell rows in sheet vs in data #206

Closed szubakwarc closed 9 months ago

szubakwarc commented 11 months ago

Hi!

First of all, great job, your project is amazing! I'm working with a data I need to filter - this works perfectly. However, I need to have possibility to change values in one of columns and there I have a problem - having filtered data and using function get_currently_selected(), the function returns the row of the displayed sheet, not the row in the data list. I have binded custom function on '_end_editcell' and I don't know how to write new cell value to a corresponding data element (don't get the data row index). Am I missing or misunderstending something?

ragardner commented 11 months ago

Hello,

Sorry if this is missing in the docs, you can use the functions below:

Sheet.displayed_column_to_data(c)
Sheet.displayed_row_to_data(r)

Let me know if you run into issues, I will update the docs with this info at some point

szubakwarc commented 11 months ago

That works perfect, thank you very much!