Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Iterate Through DataSet Rows
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01348670
Message ID:
01348687
Views:
17
Thanks Bill, that worked fine.



>Hi Kevin,
>
>There are probably various methodologies to do this. If the DataSet DataTable is held locally in memory, I usually bind the DataTable to a DataGridView and let the user navigate the grid, selecting a row to display the details. Optionally, navigating the grid could automatically get the row and display the detail data in fields on the form.
>
>One way to ge the data into the textbox would be:
>txtKey.Text = row["YourFieldName"].ToString();
>
>Bill
>
>>I want to put a Next and Previous button on a form and allow the user to move to either the previous or next row in the data set. This will this display the contents of the row in textboxes on the form. So far I have:
>>
>>
>>private void ShowRow(int iRow)
>>{
>>	DataRow row = ds.Tables["Inventory"].Rows[iRow - 1];
>>	txtKey.Text = ???
>>
>>
>>
>>where 'ds' is a dataset stored to a private member on the form.
>>
>>1) Is this the way to do this?
>>2) How to I get the data from the row into the text box?
>>
>>Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform