The DevExpress ASP.NET MVC Card View provides the ability to modify a batch of data on the client side and send it to the server in one request.
To enable the batch editing functionality set the SettingsEditing.Mode property to Batch. In this mode the data contained in a page can be edited using in-line editors. The modified cells are colored in green. Deleted cards are highlighted with gray and display the 'Recover' command item. To hide the deleted cards from the view, set the SettingsEditing.BatchEditSettings.HighlightDeletedCards property to false. All changes are maintained on the client side until the 'Save changes' link is clicked. You can cancel all changes by clicking the 'Cancel changes' link.
If a CardView contains modified data, it displays a confirm message before a callback is performed.
In this demo, use the Edit type combo box to specify the control element used to edit the data: cell or card. The 'Start Edit Action' combo box allows you to specify the action (click, double click, or focused cell click) that should be used to begin editing CardView data.
The CardView validates user-input on the client-side based on the data annotation attributes of your Model. This approach is also called unobtrusive client validation. To enable the unobtrusive validation, the partial View with the CardView extension is placed inside the HTML <form> element (rendered using the Html.BeginForm helper). The Partial View with the CardView extension contains two helpers that enable the unobtrusive client validation: Html.EnableClientValidation and Html.EnableUnobtrusiveJavaScript. An error is displayed next to the individual data editors.
Local Copy of this Demo To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer. |
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxCardViewDemos |