i have 2 textboxes,1 gridview, 1button
i put some text into the textboxes then i press the button, i can get 1 row....but when i repeat the proccess replaces the last row whith new values...always just have 1 row in my grid...
i want more then 1 row, if i press the button 5 times e want 5 rows
any help???
sorry for my english
inside the button i have this code
Code:'Criando o Dataset Dim dsFornecedor As New DataSet() 'Criando a tabela Dim tblFornecedores As New DataTable() dsFornecedor.Tables.Add(tblFornecedores) 'Estrutura do DataTable tblFornecedores.Columns.Add("CodFornecedor") tblFornecedores.Columns.Add("NomeFornecedor") 'Criando Registros Dim row As DataRow = tblFornecedores.NewRow() row("CodFornecedor") = TextBox1.Text row("NomeFornecedor") = TextBox2.Text tblFornecedores.Rows.Add(row) DataGridView1.DataSource = dsFornecedor.Tables(0)




Reply With Quote