M
Marko Vuksanovic
I am using the following code, and would like to check what is stored in each dataTable (dt) row and column,.. unfortunatelly I cannot figure out a way to do so... How can i get a value from specific row and column? for example row0, and column0...
dt.Columns.Add("id");
dt.Columns.Add("owner");
dt.Columns.Add("secret");
dt.Columns.Add("server");
dt.Columns.Add("title");
dt.Columns.Add("ispublic");
dt.Columns.Add("isfriend");
dt.Columns.Add("isfamily");
for (int i = 0; i < temp.GetElementsByTagName("photo").Count; i++)
{
for (int j = 0; j < temp.GetElementsByTagName("photo").Attributes.Count; j++)
{
dr = dt.NewRow();
dr[j]=temp.GetElementsByTagName("photo").Attributes[j].Value;
}
dt.Rows.Add(dr);
System.Windows.MessageBox.Show(dt.Columns.ToString());
}
Thanks, M.V.
dt.Columns.Add("id");
dt.Columns.Add("owner");
dt.Columns.Add("secret");
dt.Columns.Add("server");
dt.Columns.Add("title");
dt.Columns.Add("ispublic");
dt.Columns.Add("isfriend");
dt.Columns.Add("isfamily");
for (int i = 0; i < temp.GetElementsByTagName("photo").Count; i++)
{
for (int j = 0; j < temp.GetElementsByTagName("photo").Attributes.Count; j++)
{
dr = dt.NewRow();
dr[j]=temp.GetElementsByTagName("photo").Attributes[j].Value;
}
dt.Rows.Add(dr);
System.Windows.MessageBox.Show(dt.Columns.ToString());
}
Thanks, M.V.