This is a migrated thread and some comments may be shown as answers.

Know what changed after update

2 Answers 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Najid Hanif
Top achievements
Rank 2
Najid Hanif asked on 23 Sep 2011, 01:14 AM
I have a grid that use a pop up edit form. After the form has been updated, how can I tell what was changed? My goal is to send an email if a value in a drop down was changed from "Unassigned" to something else.

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 23 Sep 2011, 07:32 AM
Hello Najid,

One suggestion is to set some global variable on the Dropdowm SelectedIndex_Changed event and check for that value i the Update event.
C#:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList drp1 = (sender as DropDownList);
        if (drp1.SelectedItem.Text != "Unassigned")
        {
            flag = 1;
        }
    }
protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
    {
        if (flag == 1)
        {
       //send mail
        }
    }

Thanks,
Shinu.
0
Najid Hanif
Top achievements
Rank 2
answered on 30 Sep 2011, 08:36 PM
Tags
Grid
Asked by
Najid Hanif
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
Najid Hanif
Top achievements
Rank 2
Share this question
or