Disabling Datagrid rowheight adjustment

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I disable the ability to adjust the row height in a datagrid? I don't see any property that can be set to do this

John Suru
 
Hi,

You have to make an new datagrid. Here is an example.

Public Class NoResizeDataGrid

Inherits DataGrid



Protected Overrides Sub OnMouseDown(ByVal e As
System.Windows.Forms.MouseEventArgs)

Dim hti As DataGrid.HitTestInfo = Me.HitTest(New Point(e.X, e.Y))

If hti.Type = DataGrid.HitTestType.RowResize Then

Return 'no baseclass call

End If

MyBase.OnMouseDown(e)

End Sub

End Class


Ken
--------------------
John D Suru said:
How do I disable the ability to adjust the row height in a datagrid? I
don't see any property that can be set to do this.
 
Back
Top