S
Steiner Hubert
hello,
i develop with basic.net a pocket pc application
my table name is "mittel"
the fields in the table are name,id,customer,...
my code:
toGrid.DataSource = dset.Tables("Mittel")
toGrid.TableStyles.Clear()
Dim ts1 As New DataGridTableStyle
ts1.MappingName = "mittel"
Dim myDataCol As New DataGridTextBoxColumn
myDataCol.HeaderText = "id"
myDataCol.MappingName = "id"
ts1.GridColumnStyles.Add(myDataCol)
toGrid.TableStyles.Add(ts1)
-> but _all_ columns are visible!?
now i set a button at the formular
the code of the button:
Dim myGridStyle As DataGridTableStyle
Dim myColumnStyle As DataGridColumnStyle
For Each myGridStyle In Me.Grid_Mittel_Page2.TableStyles
MsgBox(myGridStyle.MappingName, MsgBoxStyle.Information, "1")
For Each myColumnStyle In myGridStyle.GridColumnStyles
MsgBox(myColumnStyle.MappingName, MsgBoxStyle.Information, "2")
Next
Next
End Sub
-> the msgbox shows "mittel", "1"
and "id" , "2"
the msgbox shows the right data
but the datagrid show _alle_ columns
where is the error??
i develop with basic.net a pocket pc application
my table name is "mittel"
the fields in the table are name,id,customer,...
my code:
toGrid.DataSource = dset.Tables("Mittel")
toGrid.TableStyles.Clear()
Dim ts1 As New DataGridTableStyle
ts1.MappingName = "mittel"
Dim myDataCol As New DataGridTextBoxColumn
myDataCol.HeaderText = "id"
myDataCol.MappingName = "id"
ts1.GridColumnStyles.Add(myDataCol)
toGrid.TableStyles.Add(ts1)
-> but _all_ columns are visible!?
now i set a button at the formular
the code of the button:
Dim myGridStyle As DataGridTableStyle
Dim myColumnStyle As DataGridColumnStyle
For Each myGridStyle In Me.Grid_Mittel_Page2.TableStyles
MsgBox(myGridStyle.MappingName, MsgBoxStyle.Information, "1")
For Each myColumnStyle In myGridStyle.GridColumnStyles
MsgBox(myColumnStyle.MappingName, MsgBoxStyle.Information, "2")
Next
Next
End Sub
-> the msgbox shows "mittel", "1"
and "id" , "2"
the msgbox shows the right data
but the datagrid show _alle_ columns
where is the error??