Click here to Skip to main content
13,195,146 members (67,445 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hello Everybody,

While loading the form i am retrieving values from database and showing in datagridview . when i click save,all the values are being updated .It is working fine.But i have many rows so performance is slow.
This is code i am using and it is working fine.
foreach (DataGridViewRow examinationlistrow in dgvExamination.Rows)
            {
                string _examinid = examinationlistrow.Cells[0].Value.ToString();
                string _examinvalue = examinationlistrow.Cells[3].Value.ToString();
                UpdateListItem(mrid, ic, _examinid, _examinvalue);
            }


But i want to update only changed values of the datagridview.
Posted 11-Nov-12 19:43pm
Updated 11-Nov-12 19:45pm
v2
Comments
Adersh Ram 12-Nov-12 4:06am
   
Hi,

I suggest add a new column in datagridview Like "Action", when editing a column
you change the Action column value to "Edit"(you can use Datagridview cellendedit event).

When inserting time you put a condition
IF (examinationlistrow.Cells["Action"].Value.ToString() == "Edit")
{

}

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web02 | 2.8.171019.1 | Last Updated 13 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100