RowSpanning

Hi, Can you pls share some examples to use Row spanning in ( javascript ES5 ) Treegrid?

1 Reply

MP Manivannan Padmanaban Syncfusion Team November 6, 2019 10:59 AM UTC

Hi Saravanan, 

Greetings from Syncfusion Support. 

Query: Row spanning in ( javascript ES5 ) Treegrid 

We have achieved your requirement using the queryCellInfo event of TreeGrid by changing the rowSpan. Refer the below code example, 

 var treegrid = new ej.treegrid.TreeGrid({ 
……………….. 
        gridLines:'Both', 
        treeColumnIndex: 1, 
        queryCellInfo:function (args) { 
              if(args.data.taskID == 1){  
                if(args.column.field == "priority" ){ 
                  args.rowSpan = 3; 
                } 
              } 
              if(args.data.taskID == 6){  
                if(args.column.field == "priority" ){ 
                  args.rowSpan = 6; 
                } 
              } 
            }, 
        columns: [ 
            { field: 'taskID', headerText: 'Task ID', width: 70, textAlign: 'Right' }, 
            { field: 'taskName', headerText: 'Task Name', width: 200, textAlign: 'Left' }, 
            { field: 'priority', headerText: 'Priority', width: 90 } 
        ] 
    }); 


Output: 

 


Refer the below help documentation link, 

Please get back to us, if you need further assistance. We will be happy to assist you. 

Regards, 
Manivannan Padmanaban. 


Loader.
Up arrow icon