I am using a datareader to populate a table to fill a datagrid but when I attempt to modify the datagridcolumnstyles for my datagrid I find that there are none. Below are some pertinent code snips...maybe someone can point out where I am screwing up. The data is all there and if I don't try and address the columnstyles then it displays correctly.
With m_dtInventory.Columns
.Add(New DataColumn("InventoryGUID", GetType(Guid)))
.Add(New DataColumn("Serial", GetType(String)))
.Add(New DataColumn("Category", GetType(String)))
.Add(New DataColumn("Owner", GetType(String)))
.Add(New DataColumn("Vendor", GetType(String)))
.Add(New DataColumn("Location", GetType(String)))
End With
...
Dim dgtsInventory As New DataGridTableStyle(True)
dgtsInventory.MappingName = "Inventory"
With dgInventory
.DataSource = m_dtInventory
.TableStyles.Add(dgtsInventory)
With .TableStyles("Inventory"
.GridColumnStyles(0).Width = 0
End With
End With
Any help would be appreciated,
BCrowe
With m_dtInventory.Columns
.Add(New DataColumn("InventoryGUID", GetType(Guid)))
.Add(New DataColumn("Serial", GetType(String)))
.Add(New DataColumn("Category", GetType(String)))
.Add(New DataColumn("Owner", GetType(String)))
.Add(New DataColumn("Vendor", GetType(String)))
.Add(New DataColumn("Location", GetType(String)))
End With
...
Dim dgtsInventory As New DataGridTableStyle(True)
dgtsInventory.MappingName = "Inventory"
With dgInventory
.DataSource = m_dtInventory
.TableStyles.Add(dgtsInventory)
With .TableStyles("Inventory"
.GridColumnStyles(0).Width = 0
End With
End With
Any help would be appreciated,
BCrowe