Current filter:
          You should refresh the page.
          Not Logged In

          How to implement the multi-row editing feature in the ASPxGridView

          1

          We already have the E158 example showing how to implement a similar feature. The project below is a simplified version of the same functionality, which allows you to edit all rows on a current page at once. To implement this, I added the ASPxTextBox to the DataItemTemplate Container of several columns and bound these editors to the underlying data source. This will force the ASPxGridView to always display editors in these columns. So, the end-user can input values in these editors. After that click the PostModifications button to preserve the changes made. NOTE, this is done without switching the ASPxGridView to the EditMode and back.

          To preserve the changes made, I saved editor values to the List<object> and then used these values by setting the UpdateParameters of the ASPxGridView's DataSource. Finally, to obtain editors and their values, I used the ASPxGridView.FindRowCellTemplateControl Method.

          See Also:
          How to implement the multi-edit functionality with a multi-page grid that is bound dynamically
          Custom client-side logic implementation in the grid with multi-row editing
          How to edit multiple selected rows in a single Edit Form
          How to force the grid to stay in Edit mode
          How to perform ASPxGridView instant updating using different editors in the DataItem template

          Question: E324 - How to calculate the ASPxGridView group summaries on the client side

          You must  log in  or  register  to leave comments
          Select file
          • Class1.cs
          • Default.aspx
          • Default.aspx.cs
          Select language
          • C#
          • VB.NET
          Select version
          • v2008 vol 2.2 - v2012 vol 1.2
          using System;
          using System.Data;
          using System.Configuration;
          using System.Web;
          using System.Web.Security;
          using System.Web.UI;
          using System.Web.UI.WebControls;
          using System.Web.UI.WebControls.WebParts;
          using System.Web.UI.HtmlControls;
          
          /// <summary>
          /// Summary description for Class1
          /// </summary>
          public class Record {
              int id;
              string categoryName;
          
              string description;
          
              public Record(int id, string categoryName, string description) {
                  this.id = id;
                  this.categoryName = categoryName;
                  this.description = description;
              }
              public int Id { get { return this.id; } }
              public string CategoryName { get { return categoryName; } }
              public string Description { get { return description; } }
          
          }