Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataRows and Columns

Status
Not open for further replies.
Mar 14, 2002
711
US
I am trying to read through a number of rows/columns and extract the data in to text fields on a ASP.Net page;

This is what I have for the code going through each row, but I am stuck on the procedure to extract the data in to my text fields

For Each Row In myDataSet.Tables("[All PLants Summary Data]").Rows

Console.WriteLine(Row.Table.Columns.Item(1))
Console.WriteLine(Row.Table.Columns.Item(2))

Next Row


So I want Row1,Column 2 for my First Text Field
Row2,Column 2 for my Second Field
Row3,Column 3 for my Third field, and so on...

Any ideas at all are greatly appreciated...
 
So you mean you just want set the text for a TexBox to equal a Data Item? There are several ways you could do this:

1) Loop through each row, use FindControl to get a reference on the relevant TextBox and then set it's Text property (or add a DataBinding)
2) Rather than define the textboxes on the page, place them in a Repeater and then simply bind the repeater to the DataSource


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top