<style>
.e-headercelldiv {
padding: 0 !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
</style> |
// Grid’s dataBound event handler
onDataBound: function (args) {
// This event will be triggered each time the grid data is modified, so flag variable is used so that this case is executed only on Grid initial render
if (this.initialFlag) {
var gridObj = this.$refs.grid.ej2Instances;
// All the custom aggregate elements are retrieved with its class name using ‘querySelectorAll’
var customAgg = gridObj.aggregateModule.footerRenderer.contentTable.querySelectorAll(".custom-aggregates");
var i = 0;
// The custom aggregate value is compared and custom CSS is added based on that
while (i < customAgg.length) {
var Val = parseInt(customAgg[i].innerText);
if (Val > 10) {
customAgg[i].classList.add("custom-css");
} else {
customAgg[i].classList.add("customize-css");
}
i++;
}
this.initialFlag = false;
}
} |
<style>
.e-headercelldiv {
padding: 0 !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
</style> |
// Grid’s dataBound event handler
onDataBound: function (args) {
// This event will be triggered each time the grid data is modified, so flag variable is used so that this case is executed only on Grid initial render
if (this.initialFlag) {
var gridObj = this.$refs.grid.ej2Instances;
// All the custom aggregate elements are retrieved with its class name using ‘querySelectorAll’
var customAgg = gridObj.aggregateModule.footerRenderer.contentTable.querySelectorAll(".custom-aggregates");
var i = 0;
// The custom aggregate value is compared and custom CSS is added based on that
while (i < customAgg.length) {
var Val = parseInt(customAgg[i].innerText);
if (Val > 10) {
customAgg[i].classList.add("custom-css");
} else {
customAgg[i].classList.add("customize-css");
}
i++;
}
this.initialFlag = false;
}
} |
load: function (args) {
var newResizeStart = this.$refs.grid.ej2Instances.resizeModule
.resizeStart;
this.$refs.grid.ej2Instances.resizeModule.resizeStart = function (e) {
if (!Global.timer) {
Global.timer = setTimeout(function () {
Global.timer = null;
}, 300);
return newResizeStart.apply(this, [e]);
} else {
clearTimeout(Global.timer);
Global.timer = null;
this.callAutoFit(e);
}
};
}, |