G
Guest
Hi,
This is driving me crazy. Once the TableStyle is added (last line) the datagrid comes up blank. If I comment it out, the data grid shows the column names from the dataset. I must be doing something out of sequence
Thanks in advance for help provided
To
-------
Dim dsComputerFileDetails As New DataSet(
Dim dtFileDetails As New DataTable(
dtFileDetails.TableName = "dtFileDetails
dtFileDetails.Columns.Add("Name", Type.GetType("System.String")
dsComputerFileDetails.Tables.Add(dtFileDetails
Dim dgComputer As New DataGrid(
dgComputer.DataSource = dsComputerFileDetail
dgComputer.DataMember = "dtFileDetails
Controls.Add(dgComputer
Dim tsFileDetails As New DataGridTableStyle(
tsFileDetails.MappingName = "dtFileDetails
Dim dgtbc As New DataGridTextBoxColumn(
dgtbc.HeaderText = "Name
tsFileDetails.GridColumnStyles.Add(dgtbc
dgComputer.TableStyles.Add(tsFileDetails)
This is driving me crazy. Once the TableStyle is added (last line) the datagrid comes up blank. If I comment it out, the data grid shows the column names from the dataset. I must be doing something out of sequence
Thanks in advance for help provided
To
-------
Dim dsComputerFileDetails As New DataSet(
Dim dtFileDetails As New DataTable(
dtFileDetails.TableName = "dtFileDetails
dtFileDetails.Columns.Add("Name", Type.GetType("System.String")
dsComputerFileDetails.Tables.Add(dtFileDetails
Dim dgComputer As New DataGrid(
dgComputer.DataSource = dsComputerFileDetail
dgComputer.DataMember = "dtFileDetails
Controls.Add(dgComputer
Dim tsFileDetails As New DataGridTableStyle(
tsFileDetails.MappingName = "dtFileDetails
Dim dgtbc As New DataGridTextBoxColumn(
dgtbc.HeaderText = "Name
tsFileDetails.GridColumnStyles.Add(dgtbc
dgComputer.TableStyles.Add(tsFileDetails)