Need to pass updated values after Edit Form is closed

1 posts, 0 answers
  1. Andy
    Andy avatar
    1 posts
    Member since:
    Apr 2015

    Posted 12 Jul 2018 Link to this post

    I have a Radgrid using automatic Update, and a custom Edit Form template. I need to pass all the values of an edited row so I can populate an email that will be sent to users from the code-behind. Using the code below that I have cobbled together from various posts, I can get all the row's current values, but not the updated values using the ItemUpdated event. Is there another event I can use, or different code to obtain Updated values for that row after my Edit Form is closed and database updated? I am new to this, so code examples are helpful. Thanks!

    C#

    public void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e)
            {
                GridEditFormItem item = (GridEditFormItem)e.Item;
                GridDataItem parentItem = (GridDataItem)item.ParentItem;
                string emailFlag = parentItem["EmailToSalesFlag"].Text;
                {
                    if (emailFlag == "true");
                    string SU = parentItem["StockUnit"].Text;
                    string Make = parentItem["Make"].Text;
                    string Model = parentItem["Model"].Text;
                    string Description = parentItem["Description"].Text;
                    string Type = parentItem["Type"].Text;
                    string CustName = parentItem["CustName"].Text;
                    string Salesperson = parentItem["Salesperson"].Text;
                    string RecDate = parentItem["Rec_Date"].Text;
                    string InvDate = parentItem["Inv_Date"].Text;
                    string SpiffProg = parentItem["SpiffProg"].Text;
                    string SpiffAmt = parentItem["SpiffAmt"].Text;
                    string Notes = parentItem["Notes"].Text;
                    string Approved = parentItem["Approved"].Text;
                    string MgrNotes = parentItem["MgrNotes"].Text;
                    string Email = parentItem["Email"].Text;
                    //Populate HTML email Body               
                    PopulateBody(SU, Make, Model, Description, Type, CustName, Salesperson, RecDate, InvDate, SpiffProg, SpiffAmt, Notes, Approved, MgrNotes, Email);
                }
            }

Back to Top