Hi,
How can i freeze columns in a datagrid...? I am using a datagrid using data source = an array list which is having DO object.... I want to freeze the columns of datagrid....

tell me the ideas...
regards,
rajamanickam

Re: DataGrid column Freeze in visual basic.Net by Jan

Jan
Thu Jan 22 04:41:12 CST 2004

This is not possible by using the default DataGrid. There are some other 3rd
party grid controls who have this kind of functionality.

Here is a nice list of the available controls:
http://www.windowsforms.net/ControlGallery/default.aspx?Category=9&tabindex=
9

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


"rajamanickam" <tryraja@yahoo.com> wrote in message
news:A17F6596-A60C-4E7D-B599-61ACA6C08860@microsoft.com...
> Hi,
> How can i freeze columns in a datagrid...? I am using a datagrid using
data source = an array list which is having DO object.... I want to freeze
the columns of datagrid....
>
> tell me the ideas...
> regards,
> rajamanickam



Re: DataGrid column Freeze in visual basic.Net by Ken

Ken
Fri Jan 23 11:21:08 CST 2004

Hi,

You need to create an inherited datagrid contol. Override the
on mouse down event to prevent the user from resizing the column.

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 Then

Return 'no baseclass call

End If

MyBase.OnMouseDown(e)

End Sub



Ken
----------------------
"rajamanickam" <tryraja@yahoo.com> wrote in message
news:A17F6596-A60C-4E7D-B599-61ACA6C08860@microsoft.com...
> Hi,
> How can i freeze columns in a datagrid...? I am using a datagrid using
> data source = an array list which is having DO object.... I want to freeze
> the columns of datagrid....
>
> tell me the ideas...
> regards,
> rajamanickam