Ticket T213187
Visible to All Users

ASPxGridListEditor - Support the Batch Edit Mode

created 10 years ago (modified 9 years ago)

Scenarios:
1. It is necessary to change values of a single column quickly, without clicking the Edit button in each row. In most cases, this is required for check box columns.
2. It is necessary to enter a lot of new values to multiple rows without clicking Edit. Two modes are required in this scenario:
 - save changes automatically after a new value is entered;
 - save changes in memory and post them to the database when the Save button is clicked.

Proposed solution:
Support the Batch editing mode (see Batch Editing and Updating demo) in the ASPxGridListEditor class by default.

Current solutions:

  1. Implement a ASPxGridListEditor descendant and provide custom data Item templates for grid cells. See an example here: How to implement multi-row editing in the ASP.NET ListView.
  2. Implement a fully custom ListEditor, ViewItem or built-in WebCustomUserControlViewItem based on the Web user control designed and configured in Visual Studio as per the ASPxGridView documentation. You can learn more on these XAF integration options from the How to: Show a Custom Data-Bound Control in an XAF View (ASP.NET) and Using a Custom Control that is not Integrated by Default documentation articles.
    Attached is a basic sample (dxSampleT226878.zip) illustrating these approaches in action (see the T226878.Module.Web\Model.DesignedDiffs.xafml, T226878.Web\CustomUserControls\WebUserControl1.ascx and T226878.Module.Web\Editors\ASPxGridViewItem.cs files).
Show previous comments (1)
Dennis Garavsky (DevExpress) 10 years ago

    @Dinesh: Are you referring to the How to implement multi-row editing in the ASP.NET ListView sample or to the dxSampleT226878.zip one? The first sample should already work for your existing objects after following the example's instructions while the latter one was not designed for this scenario. We do not have another ready-made example for using a batch edit and XPO data source, but it can be implemented as per the ASPxGridView documentation:
    ASP.NET Controls and MVC Extensions > ASP.NET WebForms Controls > Grid View > Concepts > Data Editing > Batch Edit Mode
    Cross-Platform Core Libraries > DevExpress ORM Tool > Getting Started > Tutorial 5 - An ASP .NET Application for Data Editing

      Hi Dennis,
      I'm referring dxSampleT226878.zip sample and I have implemented this functionality for my BusinessObject's listview.
      When I click on cell it shows me editor but it is readonly how can make it editable.
      Please find attached screen shot.

      Dennis Garavsky (DevExpress) 10 years ago

        Hello Dinesh,

        To process your recent post more efficiently, I created a separate ticket on your behalf: T238482: Read only cells when implementing batch edit mode in ASPxGridView bound to a collection of persistent objects at runtime. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

        Answers approved by DevExpress Support

        created 9 years ago (modified 9 years ago)

        We have implemented the functionality described in this ticket. It will be included in our next update(s).

        Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

        Additional information:

        ASPxGridListEditor now supports the Batch Edit Mode. Unlike other modes, in this mode, you can edit multiple rows and then click Save changes to save all modified objects at once.

        To enable the Batch Edit Mode, set the InlineEditMode property of the ListView node to Batch in the Model Editor and ensure that the AllowEdit property of the same node is set to true.

        The Batch Edit Mode has certain specificities:
            The Detail View is not invoked when a user clicks a row.
            Several data types cannot be edited: images, references, criteria, file attachments.
            Initial property values for new objects are passed to the client when the grid control is created and are not updated each time you create objects using the New Command Item.

        The Batch Edit Mode supports Inplace Validation and ConfirmUnsavedChanges mode.

          Show previous comments (2)

            Do you have plans to support reference editing out of the box? That would be a really cool feature!

            Dennis Garavsky (DevExpress) 6 years ago

              Yes, it is a part of our 2019.2 roadmap and the ASP.NET Squad is currently developing this feature (no need for How to: Edit a Reference Property in the Batch Edit Mode).
              If we face any showstoppers or require additional information, we will contact all users interested in this, as always.

              A A
              Arkady (DevExpress) 6 years ago

                We support reference and ImmediatePostData properties in ASPxGridView's Batch Edit mode in XAF v19.2. To learn more about this new feature, please read this sample on GitHub.

                Active Universal subscribers are entitled to download and install this Early Access Preview. If you currently own an active DXperience Subscription, you can test the features described herein by logging onto the DevExpress Download Manager and installing this build in trial mode. Once you do, please take a moment to tell us whether these new features address your business needs. This will help us fine-tune our code before official launch.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.