|
-
Mar 21st, 2008, 09:40 AM
#1
Thread Starter
Frenzied Member
VS[2005] Win CE 5.0 Resize Datagrid Column
Using a datatable bound to my datagrid I am wondering how to resize the datagrid's columns.
This is the code I am using:
vb Code:
Private Sub frmMovement_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CreateDT()
DataGrid1.DataSource = ds.Tables("Movements")
txtFrom.Focus()
End Sub
Private Sub CreateDT()
dtMovements = New DataTable("Movements")
'creates Seq column in datatable
Dim cSeq As DataColumn = New DataColumn("Seq")
cSeq.DataType = Type.GetType("System.Int16")
dtMovements.Columns.Add(cSeq)
'creates From column in datatable
Dim cFrom As DataColumn = New DataColumn("From")
cFrom.DataType = Type.GetType("System.String")
dtMovements.Columns.Add(cFrom)
'creates Scancode column in datatable
Dim cScanCode As DataColumn = New DataColumn("ScanCode")
cScanCode.DataType = Type.GetType("System.String")
dtMovements.Columns.Add(cScanCode)
'creates To column in datatable
Dim cTo As DataColumn = New DataColumn("To")
cTo.DataType = Type.GetType("System.String")
dtMovements.Columns.Add(cTo)
'creates Boxes column in datatable
Dim cBoxes As DataColumn = New DataColumn("Boxes")
cBoxes.DataType = Type.GetType("System.Int16")
dtMovements.Columns.Add(cBoxes)
ds.Tables.Add(dtMovements)
End Sub
-
Mar 21st, 2008, 10:31 PM
#2
Re: VS[2005] Win CE 5.0 Resize Datagrid Column
I thought it was possible using the ColumnStyle class, but as far as I can tell, it isn't an option.
My usual boring signature: Nothing
 
-
Mar 25th, 2008, 03:10 AM
#3
Frenzied Member
Re: VS[2005] Win CE 5.0 Resize Datagrid Column
Hi,
there is a log posting from the .Net CF team here describing the 'new' functionality of the datagrid, plus a sample - this may help
Pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|