Not sure why you would want to do it, but try this:
Code:
For Each c As Control In MyBase.Controls
If c.GetType() Is GetType(VScrollBar) Or c.GetType() Is GetType(HScrollBar) Then
c.Visible = False
End If
Next c
This assumes that you are extending the DataGrid as an inherited control. If you're referring to a standard DataGrid then you should substitute MyBase with the name of the DataGrid control in your form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.