Hi,
2) You need a tablestyle to adjust the column width. You need to create a
new datagrid to prevent the column and row resize.
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.ColumnResize Or hti.Type =
DataGrid.HitTestType.RowResize Then
Return 'no baseclass call
End If
MyBase.OnMouseDown(e)
End Sub
Protected Overrides Sub OnMouseMove(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.ColumnResize Or hti.Type =
DataGrid.HitTestType.RowResize Then
Return 'no baseclass call
End If
MyBase.OnMouseMove(e)
End Sub
End Class
Ken
-----------------------------
"jy836" <(E-Mail Removed)> wrote in message
news:B1e_b.104563$jk2.474135@attbi_s53...
> 1) When using images for an application (such as in an ImageList or as the
> image for a button), are the images embedded in the application or must
the
> image files be included in the setup package?
>
> 2) Is there a way to adjust the individual column widths of a DataGrid
which
> has no TableStyles or GridColumnStyles? Also, is there a way to make it
> impossible for the user to resize the columns and rows?
>
>
|