cancel
Showing results for 
Search instead for 
Did you mean: 

Two empty rows in sap.m.table

shama_parween
Explorer
0 Kudos

Hello Experts,

I have a requirement to create a table which has initially two empty row. I have achieved this with below mentioned code. Is there any better way to achieve this?

<items>

<ColumnListItem>

<cells>

<Input type="Text"/>

<Input type="Text"/>

</cells>

</ColumnListItem>

<ColumnListItem>

<cells>

<Input type="Text"/>

<Input type="Text"/>

</cells>

</ColumnListItem>

</items>

Accepted Solutions (0)

Answers (1)

Answers (1)

raghuganapath
Participant
0 Kudos

Hi,

Instead of having multiple columnlistitem, just define a (new sap.ui.model.json.JSONModel())json model which is having an array with two empty objects with null values.

Set this model to the table control. So empty rows will be added based on the number of objects.

this will work.

Regards,

Raghavendra