I have collected the values in dataset.
1. first have to all collect one column values in one variable which is in dataset
2. Have to edit that variable
3. edited values have to update in that column which is in dataset
4. display in gridview.
How to edit the particular column values in the dataset?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Sep 7, 2012, 4:29 AM EDT
Foreach(DataRow dr in dataSet1.Table[0])
{
dr["col1"]=//set some value
//or if you want to add something to exisitng values, then
dr["Col1"]=Convert.ToInt32(dr["Col1"].ToString())+5;
}
or if you want to assign to some variable.thats also you can do
Foreach(DataRow dr in dataSet1.Table[0])
{
int i=Convert.ToInt32(dr["Col1"].ToString());
dr["Col1"]=i*5;
}