0
I’m walking a DataTable
with a foreach
using a variable of type DataRow
, but I need to recover the content of DataRow
that I’m walking through.
foreach(DataRow row in DataTable.Rows)
{
string descricao = Convert.ToString(row["id"] +" - "+ row["nome"]);
int index = ??;
int value = Convert.ToInt32(row["id"]);
checkedListBoxControl1.Items.Add(value);
checkedListBoxControl1.Items[index].Description = descricao;
}
The answer answered what you wanted? Something needs to be improved?
– Jéf Bueno
yes, sorry I forgot to accept the answer;
– Victor Freitas
Relax, I just wanted to know if there was something missing =D
– Jéf Bueno