Hi Suvadeep,
Based on the query we could understand that your requirement is to change the background color of the Grid pager in the Vue’s mounted event. You can achieve it by accessing Grid’s pager element using Grid reference and then adding custom CSS class to it for which the required style can be set.
This is demonstrated in the below code snippet,
<template>
<div id="app">
<ejs-grid :dataSource="data" :allowPaging="true" ref="grid"></ejs-grid>
</div>
</template>
<script>
import Vue from "vue";
export default {
data() {
return {
};
},
mounted() {
this.$refs.grid.ej2Instances.pagerModule.element.classList.add("custom-style");
},
};
</script>
<style>
.custom-style {
background: lightblue;
}
</style> |
The above code will allow setting styles for the pager control. If you also need to set styles for the numeric items displayed in the Grid pager, then you can achieve it by applying it to the following CSS class(from the custom class added),
<style>
.custom-style .e-pagercontainer {
background: beige;
}
</style> |
We have prepared a sample based on this for your reference. You can find it below,
You can customize/style the Grid’s appearance(Including Grid’s pager control) by overriding its default CSS classes and setting style to it. The list of CSS classes that needs to be overridden for each area is explained in detail in the below help documentation link which you can refer for more details,
Let us know if you have any concerns.
Regards,
Sujith R