Currently I have a grid (columns are resizable) that is being used to store some addresses and the user has to go to another view to edit this information, so I hide the grid and show the other view.
When they save the new address information and I show the grid again I am using reconfigure to update the information so I don't have to remove the grid and rebuild it completely. My problem is that my grid width is dynamic so I am using grid.getView().setAutoFill(true); when creating the grid, but this doesn't get triggered on reconfigure so all of the columns go back to my default width, which I don't want.
Is there a way to make the Auto Fill be triggered on reconfigure?
Code:
public void createGrid(ListStore<SubmissionIndividualVO> store) {
createColumnModel(); // Create a new columnModel every time so the old one isn't used
if(grid == null){ // Only create the grid once
grid = new Grid<SubmissionIndividualVO>(store, columnModel);
grid.setBorders(true);
grid.setStripeRows(true);
grid.setAutoHeight(true);
grid.setColumnLines(true);
grid.getView().setAutoFill(true);
grid.getView().setForceFit(true);
getContentPanel().add(grid);
}else{
grid.reconfigure(store, columnModel);
}
}