cancel
Showing results for 
Search instead for 
Did you mean: 

how to applay colspan in openui5 table

srinujava
Participant
0 Kudos

how to apply colspan in openui5 table

Accepted Solutions (0)

Answers (2)

Answers (2)

karthikarjun
Active Contributor
0 Kudos

Hi Srinivas,

Could you please try nested table approach.

<table>

<tr>

<td>First cell in first table. The cell to the right has the second table in it.</td>

<td>

    <table>

    <tr><td>nested table</td></tr>

    <tr><td>nested table</td></tr>

    </table>

</td>

</tr>

</table>



Thanks,

Karthik A

srinujava
Participant
0 Kudos

hi karthik this is what i want exactly but not with html.

i need this with open ui5 controls

vijay_kumar49
Active Contributor
0 Kudos

Hello Srinivas,

what i understood here when you click on Column in table it will expand and display some data under the column right

for Example

If Yes, that is not possible using table control of SAP UI5. You can find a table control of other libraries and encapsulated it in a SAPUI5 control.


TableMergeCells

srinujava
Participant
0 Kudos

hi vijay exactly i want like your snap of tabel.

please help me to develop it

vijay_kumar49
Active Contributor
0 Kudos

Srinu,

That is not possible using table control of SAP UI5 Nested Table View in Sap.m.table

look at different approach is TreeTable

srinujava
Participant
0 Kudos

hi vijay

in tree tabel if items row(parent) conatins 2 columns then child row also can contain 2 columns only.

but i need parent row 2 columns and child row 5 columns which is not possible in tree table

former_member182862
Active Contributor
0 Kudos

Wow super short question.

Can you please elaborate? maybe provide some sample data. And even better tells us what you have tried so far.

Thanks

-D

srinujava
Participant
0 Kudos

for each row i need different number of columns

<table>

  <tr>

    <th>Month</th>

    <th>Savings</th>

  </tr>

  <tr>

    <td>January</td>

    <td>$100</td>

  </tr>

  <tr>

    <td>February</td>

    <td>$100</td>

  </tr>

  <tr>

    <td colspan="2">Sum: $180</td>

  </tr>

</table>

in the above code 3 rd row having only one column where as remaining rows are having 2 columns

and my requirement is i need  tabel like tree tabel but my child tabel should have different number of columns

eg in tabel items row haveng 3 columns where as subitems row having 5 columns

former_member182862
Active Contributor
0 Kudos

Sorry, I cannot help you with "for each row i need different number of columns"

Private_Member_15166
Active Contributor
0 Kudos

Perhaps in place of table you can use matrixlayout.

Check out few working codes here.

MatrixLayout - SAPUI5 Demo Kit

srinujava
Participant
0 Kudos

hi Dhnanjay i already seen matrix layout.

but i need tabel features