hello,
I have a datagrid that contains two textboxes and a combobox
I want to fill my combobox with a list of items ... compounds (these compounds related items section component that has the id of the first fields in the datagrid).
So each row of the grid must contain:
<id Article> <désignation Article> <list articles component>
My code is the first two fields are bound to a dataset)
ouvr_cnx ()
colcombo = New DataGridViewComboBoxColumn
DataGridView1.Columns.Add (colcombo)
As New SqlCommand mycommand Sun ("select component from Article have designationArticle, ARTICLE_COMPOSE where (= idArticleComposant Article.idArticle And idArticleComposé =" & DataGridView1.CurrentRow.Cells (0). Value & ")", MyConnection)
Sun mondatareader As SqlDataReader
mondatareader = macommande.ExecuteReader
while mondatareader.Read
colcombo.Items.Add (mondatareader (0))
MsgBox (mondatareader (0))
End While
mondatareader.Close ()
ferm_cnx ()
if anyone can help me ... PCQ vrm
cordially
I have a datagrid that contains two textboxes and a combobox
I want to fill my combobox with a list of items ... compounds (these compounds related items section component that has the id of the first fields in the datagrid).
So each row of the grid must contain:
<id Article> <désignation Article> <list articles component>
My code is the first two fields are bound to a dataset)
ouvr_cnx ()
colcombo = New DataGridViewComboBoxColumn
DataGridView1.Columns.Add (colcombo)
As New SqlCommand mycommand Sun ("select component from Article have designationArticle, ARTICLE_COMPOSE where (= idArticleComposant Article.idArticle And idArticleComposé =" & DataGridView1.CurrentRow.Cells (0). Value & ")", MyConnection)
Sun mondatareader As SqlDataReader
mondatareader = macommande.ExecuteReader
while mondatareader.Read
colcombo.Items.Add (mondatareader (0))
MsgBox (mondatareader (0))
End While
mondatareader.Close ()
ferm_cnx ()
if anyone can help me ... PCQ vrm
cordially