Turning off grid and axes of an added floating viewport using python in Grasshopper

I’m trying to figure out why turning off grid and axes of a new viewport doesn’t work in the python code below. It’s following up to this discussion, Create a new floating viewport and change its display mode
Can someone help me out? Thank you.

import Rhino
import System
import rhinoscriptsyntax as rs


if r:
    #Create a new floating view
    newView = Rhino.RhinoDoc.ActiveDoc.Views.Add("TEST", Rhino.Display.DefinedViewportProjection.Perspective, System.Drawing.Rectangle(0, 0, 600, 600), True)
    
    #Change display mode to "Shaded"
    shaded_id = Rhino.Display.DisplayModeDescription.ShadedId
    display_mode = Rhino.Display.DisplayModeDescription.GetDisplayMode(shaded_id)
    newView.ActiveViewport.DisplayMode = display_mode
    
    #Maximize viewport
    newView.Maximized = True
    
    #Zoom extents
    newView.ActiveViewport.ZoomExtents()
    
    #Turn off grid
    if rs.ShowGrid(newView) == True:
        rs.ShowGrid(newView, False)
    
    #Turn off axes
    if rs.ShowGridAxes(newView) == True:
        rs.ShowGridAxes(newView, False)
    
    newView.Redraw()

I could figure it out. The following code worked as I wanted it to be.

import Rhino
import System
import rhinoscriptsyntax as rs


if r:
    #Create a new floating view
    newView = Rhino.RhinoDoc.ActiveDoc.Views.Add("TEST", Rhino.Display.DefinedViewportProjection.Perspective, System.Drawing.Rectangle(0, 0, 600, 600), True)
    
    #Change display mode to "Shaded"
    shaded_id = Rhino.Display.DisplayModeDescription.ShadedId
    display_mode = Rhino.Display.DisplayModeDescription.GetDisplayMode(shaded_id)
    newView.ActiveViewport.DisplayMode = display_mode
    
    #Maximize viewport
    newView.Maximized = True
    
    #Zoom extents
    newViewport = newView.ActiveViewport
    newViewport.ZoomExtents()
    
    #Turn off grid
    newViewport.ConstructionGridVisible = False
    
    #Turn off axes
    newViewport.ConstructionAxesVisible = False
    
    newView.Redraw()