Hi Fernando,
As already stated, this is 'Also this is really course format independent' and thus I believe is more of a coincidence that it is the Grid format in the original post. This is because it is activity navigation on the 'incourse' page which is outside of the scope of a course format. Course format's can only adapt the 'course' page. The 'incourse' page pertains to a specific module in the '/mod' folder. Therefore the theme needs to render the activity navigation on this page.
G