L
Looch
Hi All,
Not sure if parsing is the correct word but here is what I'm trying to
do:
I have a method that returns a dataset that uses a select statement
that comprises three union all'd select statements (i.e. "select
author from table1 union all select author from table 2...").
The end result is a small dataset with one column and four rows
including the column header (three rows of data). What I'm trying to
do is iterate through the column asiging each row (there's only one
field per row) to a three different text boxes. I've done this a
hundred times with one row and many columns using code similar to
this:
foreach (DataRow dr in dt.Rows)
{
txt1.Text = dr[0].ToString();
txt2.Text = dr[1].ToString();
txt3.Text = dr[2].ToString();
}
But can't figure out how to iterate vertically through a column using
a similar method. How do I di that?
Thanks for any help.
Not sure if parsing is the correct word but here is what I'm trying to
do:
I have a method that returns a dataset that uses a select statement
that comprises three union all'd select statements (i.e. "select
author from table1 union all select author from table 2...").
The end result is a small dataset with one column and four rows
including the column header (three rows of data). What I'm trying to
do is iterate through the column asiging each row (there's only one
field per row) to a three different text boxes. I've done this a
hundred times with one row and many columns using code similar to
this:
foreach (DataRow dr in dt.Rows)
{
txt1.Text = dr[0].ToString();
txt2.Text = dr[1].ToString();
txt3.Text = dr[2].ToString();
}
But can't figure out how to iterate vertically through a column using
a similar method. How do I di that?
Thanks for any help.