Hello,
At runtime I have a datagrid which has data coming from a dataview which has data coming from a dataset. Is this possible with CF 20 I am not able to see the data within the datagrid at runtime. Am I missing something in my code Thanks in advance.
John
Code:
Private
Sub load_datagrid(ByVal dsDataset As DataSet) Dim dv As New DataViewdv.Table = dsDataset.Tables(0)
'has data 'Dim i As Integer 'For i = 0 To dv.Table.Rows.Count - 1 ' MessageBox.Show((dv.Table.Rows(i)("id"))) 'used to verify data exists and does 'Next Dim dgTable As New DataGridTableStyledgTable.MappingName = dv.Table.TableName
Dim dgCol0 As New DataGridTextBoxColumndgCol0.MappingName =
"id"dgCol0.HeaderText =
"ID"dgCol0.Width = 5
dgTable.GridColumnStyles.Add(dgCol0)
Dim dgCol1 As New DataGridTextBoxColumndgCol1.MappingName =
"code"dgCol1.HeaderText =
"Code"dgCol1.Width = 20
dgCol1.NullText =
""dgTable.GridColumnStyles.Add(dgCol1)
datagrid1.TableStyles.Clear()
datagrid1.TableStyles.Add(dgTable)
End Sub
Help populating DataGrid
LoveCode
MIS
Yes, that is possible. Common mistake is to use wrong case in mapping names. I would also suggest adding TableStyle to the grid before adding column styles to the TableStyle.
davidhhhhhhhhhhhhhh
Thanks guys. I must have been sleeping when forgetting the datasource for the datagrid. I am trying to develop on a wm 5.0 and am wondering if someone could point me to where I can read on the button that changes the screen to landscape. I need to be able to change the layout of the form if the user changes the screen layout. Thanks so far.
John