javascript - sap.m.Table 中是否有多个标题,如 sap.ui.table.Table?

标签 javascript jquery sapui5

    var otable = new sap.m.Table();//here table is created
//here multiple header I'm trying to create this can happen in sap.ui.table.Table but I want some thin in sap.m.Table
        var oColumns = new sap.m.Column({
        multiLabels: [
        new sap.m.Label({//here is main header
        text: "Input",
        textAlign: "Center"
        }),//here is sub header as input one
        new Button({
        text: "Input1"                          
        })
    ]
});

//有没有在 sap.m.Table 中创建多级标题列的想法

最佳答案

sap.m.Column 不支持控件列表,但是您可以将布局控件添加为标题以在标题中包含多个控件:

var oTable = new sap.m.Table({
    columns: [
        new sap.m.Column({
            header: new sap.m.VBox({
                new sap.m.Label({
                    text: "Input",
                    textAlign: sap.ui.core.TextAlign.Center
                }),
                new Button({
                    text: "Input1"
                })
            })
        })
    ]
});

关于javascript - sap.m.Table 中是否有多个标题,如 sap.ui.table.Table?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35986369/

相关文章:

javascript - 单击外部/悬停在外部时关闭的下拉菜单

javascript - 淡化背景颜色变化动画滞后并减慢

javascript - React 应用程序在本地系统上加载时间过长

javascript - 如何使用下划线通过键查找数组内的对象

javascript - 我必须打开模式对话框,点击功能(JQUERY 和 Bootstrap)不起作用

javascript - 使用 SAPUI5 在下拉列表中选择默认值

javascript - ArcGIS Javascript - 缩放以显示所有点

javascript - HTML5 音频播放列表 - 如何在第一个音频文件结束后播放第二个音频文件?

screen-orientation - 用于orientationchange的openui5事件处理程序

odata - 如何更改智能表 SAPUI5 中图标的文本