Kevin Lo
Kevin Lo

Reputation: 3

Toga table with similar headings' column missing data

I use Toga for my small project.

Currently use following heading

self.table = toga.Table(
        headings=['Cust_Name', 'Level', 'Loc_A', 'Loc_B', 'Product'],
        missing_value="",
        style=Pack(flex=0),
        data=self.customer_list,
        on_select=self.select_row,  # Correct handler assignment
    )

the data input to the table as following

    self.customer_list = [
        {
            "no": row[2],
            "Cust_Name": row[4],
            "Level": row[0],
            "Loc_A": row[5],
            "Loc_B": row[6],
            "Product": row[9],
            "SaveTime": row[11],
            "Phone": row[13],
            "Note": row[14] if len(row) > 15 else ""
        }
        for row in cstm_all_datas[1:]  # skip column head
    ]

result will be empty in Loc_A and Loc_B column.

after I change the heading "Loc_A" to "County", "Loc_B" to "Region".

The table show correctly.

Anyone have any ideal?

Upvotes: 0

Views: 5

Answers (0)

Related Questions