Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hai,

Iam developping a project in windows application in c#.I have the columns Items,Rate,Qty,Total in datagridview.I want to change the values of rate and qty.And also I want to calculate the Net amount after changing the values.How can i update this record to the database.Please help me.


Regards
Ananya
Posted
Comments
Sandeep Mewara 6-May-11 13:52pm    
Tried anything?
Ed Nutting 6-May-11 14:15pm    
Search CP or use Google this has been answered before.

Hi there

Don't quite know if this is what you are looking for...
dataGridView1.Rows[0].SetValues("5","t","4","3");

Where the 0 is the row index.
So zero is first row.
I didn't give any real values there

you can also edit individual cells e.g.
dataGridView1[0, 0].Value = "Hi there";


Hope this helps :)
 
Share this answer
 
Hi Ananya

I hope the following link will surely solve ur problem .



Editable GridView in ASP.NET[^]

Edit Individual GridView Cells in ASP.NET[^]

Happy codding ...:)

Seshu
 
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