I’m trying to add in a textbox all values modified in cells + the others who aren’t edited:
table name : info
columns : Name|Subname|Age|Birthday|Code
I’m using on grid view update
for(int i =0;i<4;i++){
if(e.OldValues[i].ToString() != e.NewValues[i].ToString())
{
Textbox1.text = GridView1.HeaderRow.Cells[i].Text + " " + e.OldValues[i].ToString() + " edited with " + e.NewValues[i].ToString();
}
- It’s not working I’m getting information just from 1 edited cell , if I edit 2 cells from a row I get random cell information , I mean If I edit
NameandSub NameI get Name old value and new value istead of getting both. - I want to add + the other values who aren’t edited.
thanks
Right now you are not “adding” to the textbox, you are overwriting it with “=”
Try this:
Changed the “=” for “+=”.
And for the non edited values, something like? :