-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
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
REQUEST : Add a sort function #238
Comments
Id like to add this as well. Maybe at least start with a straight forward way to sort a sheet by a single column in the sheet. That could then be exposed/used without a custom approach every time a user wants to sort a sheet. Something similar could be done for filtering a sheet. using just a single column initially |
I am looking into this due to the number of requests, if you have any further tips or advice let me know! |
Thank you. Coffee Sent!
Some benefit might be had by adding in a few more updates to the docs. If i
can i'll bounce a few of my implementations off of you so maybe they can
get incorporated as you break it out.
…On Thu, Feb 6, 2025 at 11:15 AM ragardner ***@***.***> wrote:
I am looking into this due to the number of requests, if you have any
further tips or advice let me know!
—
Reply to this email directly, view it on GitHub
<#238 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BPHJULTCTOEG4IGCGI7KYWD2OODDNAVCNFSM6AAAAABWT2IVNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBQGI4DSMZSHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hey, I somehow managed to do a sorting of data in tksheet:
|
Hello, sorting is coming soon I am just finishing the latest version which will hopefully be released within the next 5 days, changes include:
If you can think of any other sorting functions you would like to see let me know |
Awesome, thanks for the update!
I am still new to tksheet so this may already be available, but if not
would probably be use if the view to a sheet is set a certain way, maybe
it maintains that view while performing the sort. For example, its often
useful to sort a subset of the entire sheet, like when a filter is applied.
If it's easy to perform the sort in a manner that does not reset the sheet
view I think that would be very common use too. Thank you for such a useful
package.
…On Fri, Feb 14, 2025 at 12:50 PM ragardner ***@***.***> wrote:
Hello, sorting is coming soon I am just finishing the latest version which
will hopefully be released within the next 5 days, changes include:
- make the treeview have full table functionality including drag and
drop, insert rows, delete rows, undo, redo and sorting
- cell text wrapping, character or word
- Sheet.sorting functions which accept a key (default is a natural
sorting key which has the aim of try to handle any python object) and
reverse arguments, including:
- sorting a box of cells
- sorting values in rows
- sorting values in columns
- re-ordering rows based on the values of a column
- re-ordering columns based on the values of a row
If you can think of any other sorting functions you would like to see let
me know
—
Reply to this email directly, view it on GitHub
<#238 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BPHJULTH2CH6J3AXFEDNFY32PYUFPAVCNFSM6AAAAABWT2IVNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJZHEZTGMJQGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
[image: ragardner]*ragardner* left a comment (ragardner/tksheet#238)
<#238 (comment)>
Hello, sorting is coming soon I am just finishing the latest version which
will hopefully be released within the next 5 days, changes include:
- make the treeview have full table functionality including drag and
drop, insert rows, delete rows, undo, redo and sorting
- cell text wrapping, character or word
- Sheet.sorting functions which accept a key (default is a natural
sorting key which has the aim of try to handle any python object) and
reverse arguments, including:
- sorting a box of cells
- sorting values in rows
- sorting values in columns
- re-ordering rows based on the values of a column
- re-ordering columns based on the values of a row
If you can think of any other sorting functions you would like to see let
me know
—
Reply to this email directly, view it on GitHub
<#238 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BPHJULTH2CH6J3AXFEDNFY32PYUFPAVCNFSM6AAAAABWT2IVNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJZHEZTGMJQGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
#### Changed: - Text now wraps by character by default, can also disable wrapping or wrap by word - Significant changes to how text is rendered - Removed mousewheel scrolling lines in header, replaced with vertical axis table scroll - Resizing row height to text is now based on the existing column width for the cell/cells, includes double click resizing - Treeview mode `Node` class now uses `str` for parent and `list[str]` for children attributes - Function `get_nodes()` renamed -> `get_iids()` - Removed `data_indexes` parameter from `mapping_move...` functions - Reduce default treeview indent - `move()` function now returns the same as other move rows functions - All `Sheet()` functions with an `undo` parameter have been set to `True` by default - Using `Sheet.set_data()` or `Span`s to set an individual cell's data as `None` will now do so instead of returning - Setting `show_top_left` during Sheet() initialization will now make the top left rectangle always show #### Added: - Natural sorting functionality [#238](#238) - Treeview mode now works with all normal tksheet functions, including dragging and dropping rows - Cell text overflow `allow_cell_overflow: bool = False` to adjacent cells for left and right alignments, disabled by default - Text wrap for table, header and index ```python # "" no wrap, "w" word wrap, "c" char wrap table_wrap: Literal["", "w", "c"] = "c", index_wrap: Literal["", "w", "c"] = "c", header_wrap: Literal["", "w", "c"] = "c", ``` - `tree` parameter to `insert_rows()` function, used internally #### Fixed: - Index fonts now work correctly - Functions `column_width()` and `row_height()` work correctly for any parameters - Down sizing rows/columns when scrolled to the end of the axis would result in a rapid movement of row height/column width - Address [#269](#269) #### Improved: - Minor performance improvements for: - `item_displayed()` - `show_rows()` / `show_columns()` - `move()` - Row insertion
Hello, Sorting functionality has now been added in version https://github.com/ragardner/tksheet/wiki/Version-7#sorting-the-table Let me know if you think there should be adjustments or additional functionality 😊 |
The latest version is now |
Can we add a functionality that sort the column when you clicked the header ?
The text was updated successfully, but these errors were encountered: