cancel
Showing results for 
Search instead for 
Did you mean: 

Set TextArea in sap.m.ColumnListItem

Former Member
0 Kudos

Hello,

Im using sap.m.ColumnListItem to display few fields on screen.

is it possible to change the field "Wgbez" to be TextArea

and display the long text in 2 lines ?

the code is like this:

var oTemplate = new sap.m.ColumnListItem({
vAlign : "Middle",
type : "{type}",
cells : [
new sap.m.Text({
text : "{Wgbez}",
wrapping : false,
maxlines : "2"
}),
new sap.m.Text({
text : "{Maktx}",
wrapping : false,
maxlines : "2"
}),
new sap.m.Text({
text : "{Sernr}",
textDirection : "LTR",
wrapping : false
}), new sap.m.Image({
src : "{imageUrl}",
}), new sap.m.Text({
text : "{Num_days}",
textDirection : "LTR",
Width: "10px",
wrapping : false
}), new sap.m.Text({
text : "{Labst}",
Width: "15rem",
wrapping : false
}),
]
});

Thank you,

Amir

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Amir,

Yes you can use TextArea.

Also text wrapping in two lines.

var oTemplate = new sap.m.ColumnListItem({

    vAlign: "Middle",

    type: "{type}",

    cells: [

        new sap.m.TextArea({

            value: "{Wgbez}",

        }),

        new sap.m.Text({

            text: "{Maktx}",

            wrapping: true,

            maxLines: "2"

        }),

        new sap.m.Text({

            text: "{Sernr}",

            textDirection: "LTR",

            wrapping: true,

            maxLines: "2"

        }), new sap.m.Image({

            src: "{imageUrl}",

        }), new sap.m.Text({

            text: "{Num_days}",

            textDirection: "LTR",

            maxLines: "2"

            wrapping: true

        }), new sap.m.Text({

            text: "{Labst}",

            Width: "15rem",

            wrapping: true,

            maxLines: "2"

        }),

    ]

});

Regards,
Naren L Naik

Former Member
0 Kudos

Hello Naren,

Thank you for your help.

Is it possible to delete the bordersof the first text area

Thank you

Amir

Former Member
0 Kudos

Hi Amir,

Do you want your text area to be editable?

Regards,
Naren L Naik

Former Member
0 Kudos

Hello Naren,

No the the text area is to display information only.

Is it possible to delete the borders?


Amir

Former Member
0 Kudos

yup it is possible.

First

   new sap.m.TextArea({

            value: "{Wgbez}",

             editable:false                             // Add this

        }),

Add this in your index.html page

<style>

.sapMTextArea>.sapMInputBaseReadonlyInner.sapMTextAreaInner {

  1. border:0 !important;

</style>

Regards,
Naren

Former Member
0 Kudos

Hello Naren,

Thank you for your help.

Regards,

Amir

Answers (0)