Skip to content

How To add data to datatable with Loop #781

Answered by ghost
bobwatcherx asked this question in Q&A
Discussion options

You must be logged in to vote

according to your code i would do something linke:

def update_cell_value(row_index, column_index):
    row = self.myTable.rows[row_index]
    cell = row.cells[column_index]
    cell_control = cell.content # the control inside the cell, e.g. ft.Text object
    
    #e.g. if it is ft.Text
    value = cell_control.value

Datatable.rows is a list of Datarow objects.
Datarow.cells is list of all Datacells, one for every column.
Datacell.content is the content of that Datacell.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bobwatcherx
Comment options

@ghost
Comment options

Answer selected by ndonkoHenri
@tisupe
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants