Criar um Data Table e uma coluna um valor, commitar um valor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
DataTable tabela; tabela = new DataTable(); tabela.Columns.Add("coluna", typeof(string)); DataRow Row = tabela.NewRow(); Row["coluna"] = "teste"; tabela.Rows.Add(Row); /* Percorrer a tabela criada */ foreach (DataRow d in tabela.Rows) { string aaa = d["asd"].ToString(); } /*Commitar as altera��es feitas (apos um delete, edit, etc)*/ tabelaConsorcioIncluido.AcceptChanges(); |