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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top