this works fine - but here is my id field visible
-> how can i hide this id column in the grid?
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
Dim dgts As New DataGridTableStyle
dgts.MappingName = "Mittel"
Dim c As New DataGridTextBoxColumn
c.MappingName = "Name"
c.HeaderText = "Mittel"
c.Width = 100
dgts.GridColumnStyles.Add(c)
toGrid.TableStyles.Add(dgts)
-> but in the grid no column is visible
please help
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
my ID field is in the grid not visible
the user click now in a row
-> how can i determine the id field
at the active row of the grid?
dataTable.DefaultView(dataGrid.CurrentRowIndex)("id")
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
Dim dadp As New SqlServerCe.SqlCeDataAdapter("SELECT * FROM Mittel", cn)
Dim dset As New DataSet
dadp.Fill(dset, "Mittel")
Dim dgts As New DataGridTableStyle
dgts.MappingName = "Mittel"
Dim c As New DataGridTextBoxColumn
c.MappingName = "Name"
c.HeaderText = "Mittel"
c.Width = 100
dgts.GridColumnStyles.Add(c)
toGrid.TableStyles.Add(dgts)
toGrid.DataSource = dset.Tables("Mittel")
rem ???
dset.Tables("Mittel").DefaultView(toGrid.CurrentRowIndex)("id")
rem ???
MessageBox.Show(dset.Tables("Mittel").DefaultView(toGrid.CurrentRowIndex)("id").ToString())
Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com