Skip to content

Sort Datatable Columns help #3874

Closed Answered by nastiliano
nastiliano asked this question in Q&A
Discussion options

You must be logged in to vote

Hello everybody,

Attending to this post #1943 I add some lines to the official example in "on_sort" event:

import flet as ft

def main(page: ft.Page):
    page.add(
        ft.DataTable(
        width=700,
        bgcolor="yellow",
        border=ft.border.all(2, "red"),
        border_radius=10,
        vertical_lines=ft.BorderSide(3, "blue"),
        horizontal_lines=ft.BorderSide(1, "green"),
        sort_column_index=0,
        sort_ascending=True,
        heading_row_color=ft.colors.BLACK12,
        heading_row_height=100,
        data_row_color={"hovered": "0x30FF0000"},
        show_checkbox_column=True,
        divider_thickness=0,
        column_spacing=200,
        columns=[
   …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ndonkoHenri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant