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:
- 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.
- 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).
Hi Anatol,
I want to implement same feature of editing listview cell in my project, I saw your sample you have created custom objects and displayed it in new custom listview.
How can I implement this editable listview for my existing business objects?
Thanks.
@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.
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.