1

I have an XML which I converted to JSON to get HTML table out of it.

Find the demo here

I'm able to get the table, but I need width according to _cellwidth. I used ng-style but it's not working.

Also, I need to rowspan the blank cell with their _realIndex which is essentially column number to be spanned with and remove those blank later.

desired output Final Table

Please note, I wanted it to be dynamic (not hard coded).

1 Answer 1

1

Regarding your ng-style issue, change your line from

 ng-style="{ width: y._cellWidth }"

to:

 ng-style="{ width: (y._cellWidth + 'px') }"

Since your _cellWidth is just the number (in string format).

Sign up to request clarification or add additional context in comments.

2 Comments

I see your values of _cellWidth. It's very higher for a normal screen so it's not getting adjusted probably for your screen width.
how can i add all cell width of first row so we can divide individual with Sum and get specify width in %

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.