Auto merge rows

Posted by: arulventhan.palanimuthu on 13 October 2017, 12:58 am EST

    • Post Options:
    • Link

    Posted 13 October 2017, 12:58 am EST

    Hello,

    I am trying merging rows by a column ‘groupedBy’, and my code as follows.

    var grouping = [{

    field: ‘groupedBy’,

    header: {

    visible: false

    },

    footer: {

    visible: false

    }}];

    dataView = new GC.Spread.Views.DataView(document.getElementById('grid1'), $scope.data, columns,
                   new GC.Spread.Views.Plugins.GridLayout(
                   {
                   	allowSorting: false,
                   	showColHeader: true,
                   	showRowHeader: false,
                   	allowResizing: true,
                   	selectionMode: 'single',
                   	loadOnDemand: true,
                   	showToolPanel: false,
                   	allowCellMerging: true,
                   	grouping: grouping 
                   }));
    

    dataView.layoutEngine.options.mode = “free”;

    dataView.options.cellMergingSettings.alwaysShowText = false;

    dataView.data.groupDescriptors = grouping;

    dataView.invalidate();

    the result I got rows are not merged.

    I follows the steps given in below link

    https://www.grapecity.com/en/demos/spread/JS/ViewsDemo/#/demos/AutoMerge

    help me auto merge rows by an column.

    Thanks,

    Arulventhan

  • Posted 13 October 2017, 2:17 am EST

    Hello,

    Please have a look at the attached sample html page where it shows how you can merge cells. In case the issue still persists, please provide me your sample application to debug further.

    Thanks,

    Deepak SharmaSpreadViewAutoMerge.zip

  • Posted 30 October 2017, 12:04 am EST

    Hello Deepak,

    Please see the attached image below,and give me an sample for that.

    https://www.grapecity.com/en/demos/spread/JS/ViewsDemo/#/demos/AutoMerge

    i referred above url in that for merging they use following codes as like i follow in my code

     var grouping = [{
                            field: 'groupedBy',
                            header: {
                                visible: false
                            },
                            footer: {
                                visible: false
                            }
                        }];
    
     dataView = new GC.Spread.Views.DataView(document.getElementById('grid1'), $scope.Data, columns,
                           new GC.Spread.Views.Plugins.GridLayout(
                           {
                               allowSorting: false,
                               showColHeader: true,
                               showRowHeader: false,
                               allowResizing: true,
                               selectionMode: 'single',
                               loadOnDemand: true,
                               showToolPanel: false,
                               allowColumnReorder: true,
                               allowCellMerging: true,
                               grouping: grouping
                           }));
    
     dataView.layoutEngine.options.mode = "free";
                        dataView.options.cellMergingSettings.alwaysShowText = true;
                        dataView.data.groupDescriptors = grouping;
    

    thanks,

    Arulventhan NP

  • Posted 1 November 2017, 2:54 am EST

    Hello,

    It seems you are looking for a cell span feature and not cell merge. Spread.Views does not have cell Span feature. You can take a look to use Spread.Sheets in case you need to Span cell as per your requirement. Please take a look:

    http://help.grapecity.com/spread/SpreadSheets10/webframe.html#cellspan.html

    Thanks,

    Deepak Sharma

  • Posted 1 November 2017, 3:38 pm EST

    Hello Deepak,

    I found that the cell span only in spread sheets. How can i get it on spread views.

    Please provide me any samples for using cell span on spread views.

    Thanks,

    Arulventhan NP

  • Posted 5 November 2017, 6:05 pm EST

    Hi Arul,

    In Spread.Views we already have the cell merging feature where cells are merged based on the cell values. Cell span can be created across columns which is not supported by Spread.Views.

    Could you please explain your use case in detail, why do you need to span the cells in Spread.Views ?

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels