Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3441

How to achieve mergeDuplicates=“true” functionality in sap.ui.table

$
0
0

Hi,

 

working on sap.ui.table. I want to merge the data i table.like following way, i got achieved in sap.m.table using the mergeDuplicates=“true” property.

but u want to achieve the same functionality in sap.ui.table.

 

Group 
ColorType
1RedLight
Dark
BlueLight
Dark
2BlueLight
Dark
RedLight
3RedLight
Dark
BlueDark
4RedDark

 

 

 

Is it possible to achieve the same for the sap.ui.table functionality.  I saw one property in sap ui.table called "enableGrouping " but when i use this property it is not working. is this property is right one or not? Please clarify it.

If possible, do you have any sample code to refer code to refer sap.ui.table for merge functionality? Here is the code i am using, but merging is not working.                        

<sap.ui.table:Table id="MyReqsTblID"

            rowHeight="0"

            editable="true"

            allowColumnReordering="true"

            enableCellFilter="true"

            enableGrouping ="true"

             rows="{/rows}">       

            <sap.ui.table:columns>

                <sap.ui.table:Column hAlign="Left" width="15rem"  >

                    <sap.ui.table:label>

                        <Label text="Group" />

                    </sap.ui.table:label>

                    <sap.ui.table:template>

                        <Text text="{group}" />

                       </sap.ui.table:template>

                </sap.ui.table:Column>

                <sap.ui.table:Column hAlign="Left" width="15rem" >

                    <sap.ui.table:label>

                        <Label text="Color" />

                    </sap.ui.table:label>

                    <sap.ui.table:template>

                        <Text text="{color}" />

                       </sap.ui.table:template>

                </sap.ui.table:Column>

                <sap.ui.table:Column hAlign="Left" width="15rem" >

                    <sap.ui.table:label>

                        <Label text="Type" />

                    </sap.ui.table:label>

                    <sap.ui.table:template>

                        <Text text="{type}" />

                       </sap.ui.table:template>

                </sap.ui.table:Column>

           

            </sap.ui.table:columns>

       

        </sap.ui.table:Table>

 

                                                                                                                                                                                                                         Thanks                                                                                                                                                                                                                                                                   


Viewing all articles
Browse latest Browse all 3441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>