DataGridTableStyle

vellaima

Centurion
Joined
Jan 29, 2003
Messages
109
Can you please tell me where have i gone wrong. I am not able to view the data in the datagrid

Visual Basic:
Dim tst As DataGridTableStyle = New DataGridTableStyle()
tst.MappingName = tbl.TableName

Dim cs As New DataGridTextBoxColumn()
With cs
        .HeaderText = "Item ID"
        .MappingName = "item_id"
End With
tst.GridColumnStyles.Add(cs)

cs = New DataGridTextBoxColumn()
With cs
        .HeaderText = "Item Description"
        .MappingName = "item_desc"
        .Width = 100
End With

tst.GridColumnStyles.Add(cs)
DataGrid1.TableStyles.Add(tst)
 
Back
Top