make TableRecord header to left side and data to right side

make TableRecord header to left side and data to right side

  

Hello every one:

    I have a table and I need it's header row become column appears on the left side of TableRecord.

   Have you any idea?

thank you

Do you mean pivoting the table?


     A  B  C

1   x   y  z


becomes

1 A x

1 B y

1 C z


If yes, then you need to do the pivot logic yourself, using Advance Excel Forge component.

Harlin Setiadarma wrote:

Do you mean pivoting the table?


     A  B  C

1   x   y  z


becomes

1 A x

1 B y

1 C z


If yes, then you need to do the pivot logic yourself, using Advance Excel Forge component.

Thank you for your reply.

I'm wrong it's no a table,It is an Entity.

But I'm sure I want it become like this.

How can I do that?And make this Entity appears in my webscreen.

Which widget should I use?

AFAIK there's no widget for pivoting Entity.

But you can use SQL query.


Assumed your entity have this structure:

No

A

B

C


with these data:

No    A    B   C

1     10   20  30

2     11   21  31

3     12   22  32


Use this SQL:

select  No, 'A' as header, A as value

union all

select  No, 'B' as header, B as value

union all

select  No, 'C' as header, C as value


This is the result:


No header value

1       A         10

2       A         11

3       A         12

1       B         20

2       B         21

3       B         22

1       C         30

2       C         31

3       C         32


You can add sort if you like.

Like this:

select * from (

select  No, 'A' as header, A as value

union all

select  No, 'B' as header, B as value

union all

select  No, 'C' as header, C as value

)

order by No, header


No header value

1       A         10

1       B         20

1       C         30

2       A         11

2       B         21

2       C         31

3       A         12

3       B         22

3       C         32


Hope it helps...