rowspan in datatable

Hi webix Team,

https://webix.com/snippet/736a7671

how to do rowspan of last 3 rows?

Thanks

Sorry, please refer this link https://webix.com/snippet/bb5d09e1

and suppose my data is coming from server and I don’t know how many rows are same

@Meera , have u tried ‘tableId.getLastId()’ and ‘tableId.getPrevId();’ ?

Probably not the best way but you can find the last Id in the table and then with that Id find the 3rd row at the end of the table and set the rowspan.

https://webix.com/snippet/dcdc8fab

The same is possible with getIdByIndex method:

    onAfterLoad : function(){
      // counts all available items in DataStore
      var count = this.data.count();
      var third_row_from_end = this.getIdByIndex(count-3);
      this.addSpan(third_row_from_end,"name",1,3);      
    }

Thanks.

Hi webix Team,

https://webix.com/snippet/b1839781

here is the snippet in which I want remove the row on X button click and also adjust the rowspan.

Thanks,
Mira Karale

@Meera

Something like that:

https://webix.com/snippet/d476a4e8

You can attach an ‘onClick’ event to the class ‘removeAttachment’ and then remove the old colspan , remove the row and add new colspan.

Thanks Yuppy.

Its working fine.