Hi all. Here's my problem. I have two gridpanels (inside one class),
sharing the same column model. What I want is when I resize a column
on the first grid panel, the second one's same column will also resize
depending on the resize values of the first grid panel. This is
implemented using
private ColumnListener columnListener = new ColumnListener() {
public void onColumnResize(BaseTableWidget table, int colIndex,
int newSize) {
if(table==firstTable) {
secondTable.getColumnModel().setColumnWidth(colIndex, newSize);
}
}
.....//other methods here
};
However, there's a small bug with it. When I resize a column too wide,
the 2nd grid panel will be misaligned with the first grid panel. I
need them to sort of "sync", so they must be perfectly aligned after I
resize a column on the first grid panel. If it would help, here are
the configurations I made on the grid panels:
//this method is called somewhere on the creation of the two
gridpanels.
public void applyTo(GridPanel grid) {
grid.setWidth(1275);
grid.setHeight(250);
try {
grid.getView().setAutoFill(true);
grid.getView().setForceFit(true);
grid.getView().setScrollOffset(19);
grid.setAutoExpandColumn("columnId");
} catch (Exception e) {
GWT.log(e.toString(), e);
}
grid.setAutoScroll(true);
grid.setAutoHeight(false);
grid.setAutoWidth(false);
grid.setBorder(false);
grid.setEnableColumnHide(true);
grid.setEnableColumnMove(false);
grid.setEnableColumnResize(true);
grid.setEnableHdMenu(false);
grid.setEnableDragDrop(false);
grid.setStripeRows(true);
grid.setTrackMouseOver(false);
grid.setHideColumnHeader(false);
}
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---