Monday, 2 September 2013

C# how to get new value from the Gridview update event

C#: GridViewUpdateEventArgs.NewValues Property getting new value from Grid view

Eg:
Write the Selected Row updating event on the Gridview.

protected void SelectedRowUpdating_Clicked(object sender, GridViewUpdateEventArgs e)
  {
      String tempQty = String.Empty;
     // Iterate through the NewValues collection and HTML encode all
     // user-provided values before updating the data source.
     foreach (DictionaryEntry entry in e.NewValues)
    {
          e.NewValues[entry.Key] = Server.HtmlEncode(entry.Value.ToString());
          tempQty = entry.Key.ToString();
          tempQty = entry.Value.ToString();
    }
   AxGridView3.EditIndex = -1; EditDeleteSelectedOrder(tempQty);
 }

No comments:

How to Convert Between List and Container in X++ for JSON Serialization

How to Convert Between List and Container in X++ for JSON Serialization In Dynamics 365 Finance and Operations (D365FO), working with data s...