Skip to Content
Former Member
Jan 22, 2015 at 04:06 PM

Ui5 grid how to place the checkbox in some order



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