cancel
Showing results for 
Search instead for 
Did you mean: 

Ui5 grid how to place the checkbox in some order

Former Member
0 Kudos

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

})

Accepted Solutions (1)

Accepted Solutions (1)

pinakipatra
Contributor
0 Kudos

Hi ,
i think you can use property textDirection :
or
you can use matrix layout  or grid layout for better positioning

Answers (0)