Hi Chunfeng,
Greetings from syncfusion support.
Query : After use the textWrapSettings for header, the header height is not a fixed value, can we get this value? can we can get notify event when the height of a data grid is changed?
Yes, you can able to get the grid header height in Grid’s dataBound and actionComplete. dataBound event is used to get the header height at initial rendering. After every Grid actions like Reordering, Grouping, etc., grid’s header is refreshed and you can get its height in the grid’s actionComplete event. Please refer the below code example and sample for more information.
|
methods: {
dataBound: function(args) {
if (this.flag) {
// get the headercells
var headercells = this.$refs.grid.$el.getElementsByClassName('e-headercell');
console.log(headercells[0].offsetHeight); //get the header cell height
this.flag = false;
}
},
actionComplete: function(args) {
var headercells = this.$refs.grid.$el.getElementsByClassName('e-headercell');
console.log(headercells[0].offsetHeight);
}
},
|
Please get back to us if you need further assistance on this.
Regards,
Rajapandiyan S