It’s easy to determine whether a DataGridView column is invisible—just check its Boolean Displayed property. However, the Displayed property returns True even when the column is only partially visible in the screen.
You can use the DataGridView.GetColumnDisplayRectangle method to create a solution for this problem.
The second parameter to GetColumnDisplayRectangle is called CutOverFlow, which is a Boolean value that controls whether the function returns the complete column rectangle (even if the column is not completely visible) or only the portion of the column’s rectangle that is visible.
By calling this method twice, once with CutOverFlow set to true and once with it set to false, you can create a function that compares the results and returns a Boolean value when the column is only partially visible:
Return dg.GetColumnDisplayRectangle(columnindex, False).Width = _ dg.GetColumnDisplayRectangle(columnindex, True).Width