473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Working with rows in a dataset

jed
public Form1()
{
InitializeComponent();
string xml = "C:\\WirelessXML.xml";

dataSet1.ReadXml(xml);
}

private void button1_Click(object sender, EventArgs e)
{
dataGridView1.DataSource = dataSet1;
dataGridView1.DataMember = "Value";
foreach (DataRow dr in dataSet1.Tables[0].Rows)
{

}
I want to access each row and work with each one one by one how is the
best way for me to do this I want to take each row give it date and
multiply values in a certain column by a fixed value then save them
back to a typed dataset

Aug 6 '07 #1
1 1706
Is dataSet1 a typed data set already? If so, then cycling through the
rows using a loop (like the one you have) should be just fine. You just
have to set the values of the columns you want. You should also be able to
cast each DataRow to the typed version to make working with it easier.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<je*@auto-soft.co.zawrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
public Form1()
{
InitializeComponent();
string xml = "C:\\WirelessXML.xml";

dataSet1.ReadXml(xml);
}

private void button1_Click(object sender, EventArgs e)
{
dataGridView1.DataSource = dataSet1;
dataGridView1.DataMember = "Value";
foreach (DataRow dr in dataSet1.Tables[0].Rows)
{

}
I want to access each row and work with each one one by one how is the
best way for me to do this I want to take each row give it date and
multiply values in a certain column by a fixed value then save them
back to a typed dataset

Aug 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shahar | last post by:
Hi Why this code does not updated the DB, just the DataSet: DataSet ds = new DataSet(); OleDbDataAdapter adapter = new OleDbDataAdapter("Select * from Employees",...
9
by: Bob Achgill | last post by:
I would like some example code that shows retrieving and updating selected column data from a DataTable. I am sucessful to load and select the whole row of a DataTable into a datagrid. But...
12
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they...
2
by: RSH | last post by:
I have a situation where I am filling two datasets and I need to print out the names that appear in both datasets. I initially converted them to dataviews, sorted on last name and performed a...
0
by: Dave | last post by:
I'm having trouble trying to get some bound datagrids to work. I even tried to use some examples that were given to me, but I can't get those to work, either. I have customers, who have orders,...
4
by: Jimmy M | last post by:
I've got a page that generates dropdowns and text boxes based on database data. I have them all set to auto-postback because I'll be using this with Atlas to make a more seamless user experience....
1
by: Noppers | last post by:
I am trying to insert data into 2 tables, Order and Order_Item, in a transaction. Everything works fine if I only have 1 row in my objCartDT dataset. If I have only one row, the 2 tables are updated...
1
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then...
3
by: Bryan | last post by:
I have an MS Access DB with a table' Isometric' . One of the columns is named 'Sheet'. I am doin a test to see if I can change a value in the dataset and update the Access table with the...
2
by: Sheikko | last post by:
ADO.NET - Working with DataSet ========================= HI, I want to create an application that interact with a DB. I wont to use SQL statement, but I want to use DataSet. - I have created my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.