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 Disable “Advanced Filter or Sort” and Enforce Custom Filters on Any D365FO Form

 In Dynamics 365 Finance and Operations, users can apply filters through the “Advanced filter or sort” feature found under the Options tab...