【问题标题】:ExtJS EditorGridPanel ~ set row height and cell width to display all cell contentExtJS EditorGridPanel ~ 设置行高和单元格宽度以显示所有单元格内容
【发布时间】:2015-06-23 11:46:11
【问题描述】:

当 ExtJS GridPanel 或 EditorGridPanel 中的单元格包含的数据超出其显示范围时,用户必须调整列的大小。

有没有办法让 GridPanel 自动扩展其列/行的宽度和高度以显示其数据?有没有这样做的例子?

使用 ExtJS 3.4

谢谢

【问题讨论】:

    标签: javascript extjs extjs3 gridpanel


    【解决方案1】:

    直到 4.0.2 版才实现自动调整,但您可以使用 withminWidth 属性。

    http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.grid.column.Column-method-autoSize

    columns: [
        { text: 'data1', dataIndex: 'name',  width: 150, autoSizeColumn: true },
        { text: 'data2', dataIndex: 'email', width: 100, autoSizeColumn: true, minWidth: 150 },
        { text: 'Phone', dataIndex: 'phone', width: 50 }
    ]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-10-26
      • 1970-01-01
      • 1970-01-01
      • 2011-07-02
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多