我使用 EditorGridPanel 和 gwtext 中的 CheckBoxSelectionModel 创建了一个网格。现在,我在使用以下代码选择行列后禁用该复选框:
cbSelectionModel.addListener(new RowSelectionListener() {
public boolean doBeforeRowSelect(RowSelectionModel c, int rowIndex,
boolean keepExisting, Record record) {
if (!keepExisting) {
return false;
}
return true;
}
public void onRowDeselect(RowSelectionModel sm, int rowIndex,
Record record) {
}
public void onRowSelect(RowSelectionModel sm, int rowIndex,
Record record) {
}
public void onSelectionChange(RowSelectionModel sm) {
}
}
);
现在的问题是,如果我点击网格中远离复选框的列。那么网格每次都会移动到左侧。请建议我如何解决这个问题。
最佳答案
我通过使用以下行解决了这个问题:
checkInViolationGrid.getGrid().getView().setAutoFill(true);
关于java - 选择行的列后,网格移动到 GWTEXT 的 EditorGridPanel 的左侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23337782/