I have a function which creates a bootstrap table and i have to merge only specific columns in that table dynamically.
this.$('#Table1').bootstrapTable({
striped: false,
minimumCountColumns: 2,
smartDisplay:true,
clickToSelect: false,
columns:[
{
field:'Key2',
title: $.t('report:'+code+'.Col2'),
align: 'left',
valign: 'middle',
sortable: true,
events : this.linkEvents
formatter :this.linkFormatter
}
]
});
linkEvent function:
linkEvents: {
'onPostBody #Table1': function(e,value,row,index) {
console.log("Inside post-body event");
$('#Table1').bootstrapTable('mergeCells',{
index:6,
colspan:2
});
}
}
even the above code doesnt working it is not coming inside the mergeCells method. Please help me on this..
Finally found the answer with the help of @Frogmouth(really great support).. change the code as following :
//no need of linkEvents function. Instead use jquery
thanks