cancel
Showing results for 
Search instead for 
Did you mean: 

How to design Label and Inputfield in 1 row?

Former Member
0 Kudos

Hi,

I want to design 1 Label and 1 Inputfield in 1 row in a Web Dynpro View.

The RootUIElementContainer is assigned MatrixLayout and the Labels and InputField are assinged in it.

But all are appearing in a single row as:

Label1: Inputfield1 Label2: Inputfield2

Regards

Neha Singh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Singh

Select "Label2"

In the properties. Look up "Layoutdata"

Set it to "MatrixHeadData"

That's it.

Jeschael

Former Member
0 Kudos

Correct. Assign MatrixHeadData for all elements that should start a new row. Additionally you might also set stretchedHorizontally = false for the MatrixLayout itself, the default value is true which is suboptimal.

Armin

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Neha,

Its very simple. U want to display the Label2: Inputfield2 in the second row rt?

Then select Label2 -> Right Click -> Properties

In the Properties go to layoutdata and set it to "MatrixHeadData".

This will definately solve your problem

Regards,

Kavitha

Former Member
0 Kudos

Hi Neha,

If your requirement is to have specified number of columns in a row then its better to go with GridLayOut.

For example Your requirement is to have 4 columns per row, then you can set the no of columns as 4 but now in 3rd row you want 2 columns only i.e one lable and one input field, in this case right click on input field-> properties then change the colspan to 3. This way you can achive two UI elements in four columns only.

Similarly you can have any number of UI elements in one row based on no of columns.

if you require more information i can help you.

Regards

Narendra

Former Member
0 Kudos

No, it's not better. MatrixLayout is preferable over GridLayout.

Armin

Former Member
0 Kudos

Hi Neha,

Also you can check the following article on sdn:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b06c8c9a-19a4-2b10-d985-9ae7a438...

This is a step by step document for the ui elements in webdynpro java. For matrix layout you can refer to page no.15.

It will also help you in future.

Regards.

Rajat

Former Member
0 Kudos

Hi Neha Singh ,

RootUIElementContainer----Grid layout

col count -- 2

or

RootUIElementContainer--Matrix layout

layoutdata for label2--MatrixHeadData

Regards,

P.Manivannan

Former Member
0 Kudos

Hi,

Is there any link in www.help.sap.com that deals with

designing Web Dynpro views in prescribed layout.

Means, I need a Step by Step Document.

Regards

Kaushik Banerjee

Former Member
Former Member
0 Kudos

Something like this:

[Best Practice|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0e682bd-b59e-2b10-cd82-fa175f502fe6]

It really depends on what you are trying to do......

J

Former Member
0 Kudos

Neha,

Or you can change the Layout to GridLayout and set the ColCount property to 2 ...then it will automatically goto the next row after 2 elements on the first one....

Regards,

Shikhil