Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid: Hiding scroll bars

Status
Not open for further replies.

towguy

Programmer
Jun 22, 2006
9
Is there a way to hide Vertical or Horizontal scroll bars or both in DatGrid Control?
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top