Problem when crating custom html code on a grid view to display a header navbar

Hi, I’ve the next requirement, I want to add a navigation var on a grid view to make different grids on a better accessible way. My SC version is 8. To do that, I’ve added the html code for the navbar on the onHeader event of the grid.
The result is the attached image. The problem comes when I navigate, into the grid, that a error modal layer appears all the time (see attached image). What can I do to avoid this modal layer and keep the navbar?

AwesomeScreenshot-Informe-Tiempo-de-apertura-de-alarmas-2019-07-22-10-07-63.jpg

AwesomeScreenshot-Informe-Tiempo-de-apertura-de-alarmas-2019-07-22-10-07-55.jpg

Aplication - Settings - Error setting - Ajax error Output = NO.

Thanks, it works! The problem is that now the ajax output errors will not appear, I hope my application will not produce anyone.