Hi all,
iam currently working on winforms and iam using a a datagrid. in that
when i click on the border of a column it adjusts itz width itself according
to the data of that column. What i want to know is what even is fireing when
i double click on the column border

thanks in advance

--
Deepson Thomas

Re: Datagrid column Resizing event by Mona

Mona
Thu Jul 14 23:41:54 CDT 2005

Hi Deepson,

To capture double click on the datagrid's column border for clumn resizing,
you can use HitTest method. The following example shows this:

Dim myHitTest As System.Windows.Forms.DataGrid.HitTestInfo

Private Sub DataGrid1_MouseDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseDown

' Use the DataGrid control's HitTest method with the x and y properties.

myHitTest = DataGrid1.HitTest(e.X, e.Y)

End Sub

Private Sub DataGrid1_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.DoubleClick

If myHitTest.Type = DataGrid.HitTestType.ColumnResize Then

MessageBox.Show("Column resized!")

End If

End Sub

Hope this helps. Have a nice day!

Mona [GrapeCity]

"Deepson Thomas" <DeepsonThomas@discussions.microsoft.com> wrote in message
news:C7614076-3949-4C17-9CAC-77AF1AE38EB3@microsoft.com...
> Hi all,
> iam currently working on winforms and iam using a a datagrid. in that
> when i click on the border of a column it adjusts itz width itself
> according
> to the data of that column. What i want to know is what even is fireing
> when
> i double click on the column border
>
> thanks in advance
>
> --
> Deepson Thomas