Well Marty,
You can use the Tablestyle Collections for the Same. Here when you click the
datagrid and see its properties there you set the Tablestyle properties.
Or you can also use it in code like the code example listed below
Dim tableStyle As New DataGridTableStyle
tableStyle.MappingName = "Grouping"
Dim column As New DataGridTextBoxColumn
column.MappingName = "Group_Code"
column.HeaderText = "Code"
column.Width = 70
tableStyle.GridColumnStyles.Add(column)
column = New DataGridTextBoxColumn
column.MappingName = "Description"
column.HeaderText = "Description"
column.Width = 200
tableStyle.GridColumnStyles.Add(column)
column = New DataGridTextBoxColumn
column.MappingName = "Remarks"
column.HeaderText = "Remarks"
column.Width = 100
tableStyle.GridColumnStyles.Add(column)
Me.DataGrid1.TableStyles.Add(tableStyle)
"Marty" wrote:
Hi,
How do I set rows/colums, titles and data in the DataGrid control of
VB.NET. I don't want to pass through a dataset and use databinding. I
want to set this grid manually.
Is there any tutorial for that?
Thanks
Marty