0

我有一个可编辑的网格。在其中一个单元格中,我输入了 4000 多个字符。但问题是只有 4000 个字符可见,其余字符不可见,但它们在单元格中。如果我用鼠标选择不可见区域,那么它们是可见的。场景是每当单元格有超过 4000 个字符时,它就会发生,并且只显示 4000 个,其余的都是不可见的。PFB 屏幕截图。

屏幕截图中的文字不可见,但有文字。 在此处输入图像描述

如果我用鼠标选择文本是可见的:

在此处输入图像描述

谢谢!

4

1 回答 1

0

尝试向该单元格添加渲染器:

GridCellRenderer<BaseModel> renBIG = new GridCellRenderer<BaseModel>() {
   @Override
    public Object render(BaseModel model, String property, com.extjs.gxt.ui.client.widget.grid.ColumnData config, int rowIndex, int colIndex, ListStore<BaseModel> store, Grid<BaseModel> grid) {
                    return "<div style='width:100%; white-space: normal;'>" + (String) model.get("CELLNAME") + "</div>";
                }
            };
    columnBIG.setRenderer(renBIG );
于 2013-02-08T20:41:02.753 回答