Datagridview - check if the last column is fully displayed

I was wondering if there was a way to determine if the last column is fully displayed.

I know there is a Displayed property on a column, but that property is true if the column is either partially or fully displayed. I only want it if the column is fully displayed.


This will do it:

Function IsFullyVisible(ByVal dg As DataGridView, ByVal columnindex As Integer) As Boolean  

    Return dg.GetColumnDisplayRectangle(columnindex, False).Width = dg.GetColumnDisplayRectangle(columnindex, True).Width

End Function

Call it by IsFullyVisible(DataGridView1, DataGridView1.ColumnCount - 1) to get if the last column is fully visible.

Need Your Help

.NET WebBrowser - FireBug Style Inspect HTML Element

c# javascript .net html firebug

Is is possible to use .NET 3.5/4.0 to Inspect HTML Elements in a WinForm Web Browser?

Symfony request not returning Date header

symfony http-headers request

I'm working on an API and I can't get Sf2 to catch the "Date" parameter from the request header... Demo is below. I'm testing my API via Postman.