在sap.m.Table中有多个标题,如sap.ui.table.Table?

时间:2016-03-14 11:31:22

标签: 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

中创建多级标题列

1 个答案:

答案 0 :(得分:1)

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"
                })
            })
        })
    ]
});