ma secondo voi così deve funzionare?
codice:
Public Class Form1
Inherits System.Windows.Forms.Form
Dim ts1 As New System.Windows.Forms.DataGridTableStyle
Dim ts2 As New System.Windows.Forms.DataGridTableStyle
Dim ts3 As New System.Windows.Forms.DataGridTableStyle
Dim ts4 As New System.Windows.Forms.DataGridTableStyle
Dim ts5 As New System.Windows.Forms.DataGridTableStyle
codice:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim c0 As New DataGridTextBoxColumn
Dim c1 As New DataGridTextBoxColumn
Dim c2 As New DataGridTextBoxColumn
Dim c3 As New DataGridTextBoxColumn
Dim c4 As New DataGridTextBoxColumn
c0.Width = "95"
c1.Width = "50"
c2.Width = "20"
c3.Width = "60"
c4.Width = "80"
ts1.GridColumnStyles.Add(c0)
ts2.GridColumnStyles.Add(c1)
ts3.GridColumnStyles.Add(c2)
ts4.GridColumnStyles.Add(c3)
ts5.GridColumnStyles.Add(c4)
DataGrid1.TableStyles.Add(ts1)
DataGrid1.TableStyles.Add(ts2)
DataGrid1.TableStyles.Add(ts3)
DataGrid1.TableStyles.Add(ts4)
DataGrid1.TableStyles.Add(ts5)