on 04-10-2015 3:37 AM
All,
I have a table in the mobile framework (sap.m.table) and it is working great. I am using the mergeDuplicates property on one of the columns and it is also working as expected. One thing I want to know if it is possible and maybe guidance to documentation or examples .. my merged cell is working fine ( I don't see repeated rows), however my merge cell is more than a couple rows long. how can I make it rowSpan > 1 so that my merge cell takes n number of rows and my cells > (mergedCell) is only 1 row height each... currently, my first row has the height of my merge cells. ideally I would like my merge cell to take as many rows as it needs.. but the cols >2 to be only 1 row height
it seems like my merge cells in the column is working but my rows aren't. any ideas / tips are appreciated.
thank you in advance
When you set mergeDuplicates to true on an sap.m.Column, it sets a class (sapMLIstTblCellDup) on all <td> tags, except for the first targeted <td>, within that column. The class simply styles those <td> tags to look like a row span. In order to get your scenario to work, you have to use jQuery to remove all the other <td> tags in that column as well as set to rowspan on the targeted <td> to the length of rows that have duplicated value.
On this example, i know that my rowspan will always be 8. To make it 100% dynamic, you will need to find how many rows the duplication lasts for. I also added a class (mtrlAttrs) to the targeted <td> tag so i can find it with jQuery.
You will need to call this function after your table is rendered and also on the updateFinished event of the sap.m.Table if you have growing enabled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I can answer myself here.. If I increase the width of my merge cell this solves my issue.
hope others can benefit from it. I knew it was a simple thing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please mark this Discussion with a Correct Answer and Helpful Answer where appropriate. See http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why Even if you discovered the solution without any outside contributions, it helps others to understand what the solution turned out to be.
Regards, Mike (Moderator)
SAP P&I Technology RIG
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.