Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How to change a value in Dataset table cells.
For example -

How to change a value in "dataset.tables[0].rows[1].itemarray[2]" this position.
Posted
Updated 22-Dec-11 19:35pm
v3
Comments
mmvr2k11 23-Dec-11 1:22am    
explain u r requiremnt clearly for my understanding.

Did you try?
I think, direct change to it should have worked!
C#
dataSet1.Tables[0].Rows[1].ItemArray[2] = "Test";


Also try:
C#
ds.Tables[0].Rows[1]["Thisfield1"] = "Test";

// OR

ds.Tables[0].Rows[1][2] = "Test";


Found this for you to read: How to: Edit Rows in a DataTable[^]
 
Share this answer
 
Comments
Member 11638380 13-Apr-16 6:19am    
how to implement this in function
ds.Tables[0].Rows[5][11]="test";
and how to call that function
It should work directly
dataSet1.Tables[0].Rows[4].ItemArray[2] = "Updated String";
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900