Custom processing message in the sDom for a custom button press
Custom processing message in the sDom for a custom button press

I have added a button in the sDom. This button when clicked, shows or hides all child rows and a few columns. I am trying to add a custom message as processing all rows and columns takes some time. I have a custom message inside a custom div added to the sDom. By calling a method(showProcessingMessage()) inside the preDrawCallBack() shows the message in the div. And calling another method (hideProcessingMessage) inside drawCallBack() hides the message. This works perfectly well for sorting and filtering which is the expected behaviour. But there is another custom button on the sDom that toggles between showing/hiding a few columns as well as child rows. This button also takes a lot of time to process. A method to show the "processing message" is added on this button's onClick. And a method to hide the message is called at the end of processing the onClick. I see the "processing message" when I step through the debugger after clicking this button. But I cannot see without it. Since there is a lot of data, this method may take upto 4secs to complete. Also, most of the columns are hidden on a "Hide" and they are shown back on a "show". This also resizes the table.
Why does the "processing message" fail to show on only this specific button click? Am I missing something?
I cannot share the code, but i can give clarification if my question is very confusing.
Thanks in advance for the help.