DHX Window: Remove Footer Method

I want to remove a Footer from a DHX Window (footer: false) dynamically. I see how to remove a control attached to a footer but no reference to turning off the footer. The problem is when I remove the control the ‘space’ is still left and I want to remove that empty space where the control was. Any ideas? Thank you.

I’ve not tried it but would paint() work after removing the control?
I know after I dynamically resize the height of my grids I have to re paint the layout so that the size applies

Hello Elroco. Thank you for the suggestion but .paint() does not seem to work. I’m assuming because the footer is ‘added’ using dhxWindow.footer.data.add { params } so it’s not actually the ‘window’ that is being updated.

I’m not aware of a direct, easy way to do it, but you should be able to use the cssManager and apply/remove a style containing “display: none” on the dhx_window-footer class.

2 Likes

@kcasarez is right. The only solution is to hide the footer html element using the css.

Worked like a charm! Thank you. I was looking for a built-in DHX method thinking if you can ‘add’ a footer you could also ‘remove’ a footer. I could not find a way to use cssManager so this is what I used:

document.getElementsByClassName(‘dhx_window-footer’)[0].classList.add(‘hidefooter’);

CSS: .hidefooter { display: none }