The signature of OnPrepareViewStyleInfo is wrong.
In VB, you can use the ClassName and MethodName dropdowns at the top of the edit window in Visual Studio to avoid this problem. Visual Studio will put in the proper stub for you if you use these dropdowns to do your overrides.
In your code, you don't have to worry about casting any sender object as the Me variable will refer to the gird in question. And the sender object is not one of the arguments.
Public Class MyGrid
Inherits GridDataBoundGrid
Protected Overrides Sub OnPrepareViewStyleInfo(ByVal e As GridPrepareViewStyleInfoEventArgs)
End Sub
End Class