Skip to Content
0

How to align sap.m.Table using scroll container with header fixed ?

Nov 27, 2017 at 06:26 AM

271

avatar image
Former Member

I have 1 table for header which is fixed and below that i have another table for rows in which i am using scroll container. I want to know how to make alignment of header columns with rows when i add new rows to my table.

kindly find below xml view:

<Table showNoData='false' id="ID_TBL_HD_NEW">

<columns>

<Column>

<header> <Text text="{i18n>leadId}" /> </header>

</Column>

<Column>

<header> <Text text="{i18n>description}" /> </header>

</Column>

<Column>

<header> <Text text='CompanyCode' /> </header>

</Column>

<Column>

<header> <Text text='ContactPerson' /> </header>

</Column>

</columns>

</Table>

<ScrollContainer vertical='true' id="ID_SCROLL_NEW" horizontal="true">

<Table items="{Model>/results}" id="ID_TBL_SCROLL_NEW" itemPress="onPressRow"> <columns>

<Column>

</Column>

<Column>

</Column>

<Column>

</Column>

<Column>

</Column>

</columns>

<items>

<ColumnListItem type="Navigation">

<Link text="{Model>LeadID}" press="navToLeadDetails" />

<Text text="{Model>Description}" />

<Link text="{Model>CompanyCode}" press="onPressCompanyId" />

<Link text="{Model>ContactPerson}" press="onPresscontactPerson" /> </ColumnListItem>

</items>

</Table>

</ScrollContainer>

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Irfan Gokak Nov 27, 2017 at 09:59 AM
1

Hi Toshif,

The alignment is not proper because you have used list type="Navigation" so it added ">" icon at the end. Other than type navigation use type="Active". Hope this will resolve your issue.

And also you will face the same issue when the scroll comes in the list in that case you can one more empty coloumn at the end of first list empty text and set its width equal to scrollbar width.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi,

That problem is fixed, Thanx.

But the header table is not fixed now.

0
Irfan Gokak Nov 27, 2017 at 08:37 AM
0

Hi,

You're getting any error? Please share screenshots.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 27, 2017 at 09:22 AM
0

I am not getting any error. All i want is to align my header table columns to the item table columns respectively.

In the above image, you can easily point out my question of alignment.

The first column (LeadID) is aligned properly, in the same way i want all the columns to be aligned (respectively).

Kindly help,

Thanks


align.jpg (38.4 kB)
Share
10 |10000 characters needed characters left characters exceeded