Horizontal scroll for Data Grid

Data Grid columns are updated when the columns attribute itself is set. So you can tell Anvil to update the columns by doing:

    self.data_grid_1.columns = self.data_grid_1.columns

So this is one way to change a column’s width:

    self.data_grid_1.columns[0]['width'] = 500
    self.data_grid_1.columns = self.data_grid_1.columns

(Thinks: I should add this to the reference docs…)

5 Likes