Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Ui5 grid how to place the checkbox in some order

HI

I've the following code which i should use in GRID the problem is that the check-boxes are not ordered one below other .

I want the some title will be in the left side of the screen and checkbox 1 and 2 will be under it...

btw,I dont know how to format the code in order to paste it like code to the forum....

var oVLayout = new sap.ui.layout.Grid("hLayout1");
var oTV = new sap.ui.commons.TextView({
id: 'Parent',
text: 'some title ',
design: sap.ui.commons.TextViewDesign.Bold
//layoutData:new sap.ui.layout.GridData({span: "L2 M6 S12"})
});
oVLayout.addContent(oTV);
var oParentCheckBox = new sap.ui.commons.TriStateCheckBox("pcb1", {
text: "Select / Deselect All"
//layoutData:new sap.ui.layout.GridData({span: "L2 M6 S12"})
});
oVLayout.addContent(oParentCheckBox);
oVLayout.addContent(new sap.ui.commons.HorizontalDivider({
height: sap.ui.commons.HorizontalDividerHeight.Medium
}));
var aChildren = [
new sap.ui.commons.CheckBox("ccb1", {
text: "test 1"
//layoutData:new sap.ui.layout.GridData({span: "L2 M6 S12"})
}),
new sap.ui.commons.CheckBox("ccb2", {
text: "test 2"
//layoutData:new sap.ui.layout.GridData({span: "L2 M6 S12"})

})
Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question