Hi all. Help! What am I doing wrong? My datagrid works fine, the
columns are created and the data is filled. However, I just cannot
resize the column widths to what I want them to be. I created a
TableStyle but it is ignored. :-(
I am using this code:
Dim DS As New DataSet
Dim MyTable As New DataTable
Dim Col0 As New DataColumn
Dim Col1 As New DataColumn
Dim Col2 As New DataColumn
DS.Tables.Add(0 )
DS.Tables(0).Co lumns.Add(Col0)
DS.Tables(0).Co lumns(0).Column Name = "Checked"
DS.Tables(0).Co lumns.Add(Col1)
DS.Tables(0).Co lumns(1).Column Name = "Path"
DS.Tables(0).Co lumns.Add(Col2)
DS.Tables(0).Co lumns(2).Column Name = "Node"
Dim newRow As DataRow
newRow = DS.Tables(0).Ne wRow
newRow.Item("Ch ecked") = False
newRow.Item("Pa th") = datSplit(0)
newRow.Item("No de") = NodeName
DS.Tables(0).Ro ws.Add(ErrRow)
myDataGrid.Data Source = DS
myDataGrid.SetD ataBinding(DS, DS.Tables(0).To String)
--
Daniel
MCSE, MCP+I, MCP in Windows 2000/NT
--------------------------------------
remove the 2nd madrid from my mail address to contact me.
columns are created and the data is filled. However, I just cannot
resize the column widths to what I want them to be. I created a
TableStyle but it is ignored. :-(
I am using this code:
Dim DS As New DataSet
Dim MyTable As New DataTable
Dim Col0 As New DataColumn
Dim Col1 As New DataColumn
Dim Col2 As New DataColumn
DS.Tables.Add(0 )
DS.Tables(0).Co lumns.Add(Col0)
DS.Tables(0).Co lumns(0).Column Name = "Checked"
DS.Tables(0).Co lumns.Add(Col1)
DS.Tables(0).Co lumns(1).Column Name = "Path"
DS.Tables(0).Co lumns.Add(Col2)
DS.Tables(0).Co lumns(2).Column Name = "Node"
Dim newRow As DataRow
newRow = DS.Tables(0).Ne wRow
newRow.Item("Ch ecked") = False
newRow.Item("Pa th") = datSplit(0)
newRow.Item("No de") = NodeName
DS.Tables(0).Ro ws.Add(ErrRow)
myDataGrid.Data Source = DS
myDataGrid.SetD ataBinding(DS, DS.Tables(0).To String)
--
Daniel
MCSE, MCP+I, MCP in Windows 2000/NT
--------------------------------------
remove the 2nd madrid from my mail address to contact me.
Comment