It’s a difficult time for many – our hats off to the brave men and women helping heal those affected by the virus. We’ll get through this together.
We are working hard to get our next major release out the door in the next 45 days. We expect to share more information on the release and what we expect to include shortly. In the meantime, here’s this month’s edition of XAF Tips & Tricks. We hope it’s of value…
Interesting Support Tickets
- Change data access mode for all non-persistent List Views in your application
- Check if Model Differences have unusable nodes in code
- Create custom navigation items and manage them in the Model Editor
- Filter a user's roles based on custom logon parameters
- Note that the Office Module uses RichEditDocumentServer instead of RichEditControl to perform mail merge
- Specify time in a Report Parameter when displaying a preview
- Change loading panel text dynamically in ASP.NET applications
- Show pop-up windows in ASP.NET applications - best practices
- Connect your XPO ASP.NET Core apps to multiple databases
- Learn how to migrate your existing WinForms and WebForms projects to XAF Blazor UI
Usability & Performance Enhancements
- When used in Batch Edit Mode, ASPxGridListEditor correctly displays new item rows with validation rules
- We enhanced the performance of ASP.NET List Views with many reference columns (when used in Batch edit mode)
- OurLocalization Service now includes a Show Calculated Values checkbox. When this option is unchecked, the service hides items you don't ordinarily need to localize: calculated values, items without a value in a default language, and values that contain property names (for example, ObjectCaptionFormat, DisplayFormat).
Documentation Updates
Simplified Permission Checks in Custom Code
We extended the SecurityStrategy class with numerous methods you can use to check if a user can perform CRUD operations: IsGrantedExtensions. For supplementary information, please review the following article: How to: Display a List of Users Allowed to Read an Object.
List View Data Access Modes
We have redesigned online documentation for the following important concepts and added comparison tables. We also fully documented our new ServerView and InstantFeedbackView modes.
Please let us know if this information is of value or if you feel we need to add additional content to help you select the appropriate mode for specific usage scenarios.
Simplified Access to Detail View Editors
You can now avoid ViewItem.ControlCreated and other event handlers for many common usage scenarios - simply use our DetailView.CustomizeViewItemControl method inside the OnActivated method to customize View item controls. You no longer need to unsubscribe from events or check whether controls are created. Please let us know your thoughts.
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Editors;
using DevExpress.XtraEditors;
// ...
public class SetMinValueController : ObjectViewController<DetailView, DemoTask> {
protected override void OnActivated() {
base.OnActivated();
View.CustomizeViewItemControl(this, SetMinValue);
}
private void SetMinValue(ViewItem viewItem) {
SpinEdit spinEdit = viewItem.Control as SpinEdit;
if (spinEdit != null) {
spinEdit.Properties.MinValue = 0;
}
}
}
Security System - New Code Example & KB Article
This GitHub repository demonstrates how to generate database updater code for security roles created via the application UI in a development environment. This KB article explains how to prevent deletion of the last active Administrator and the last administrative role with active users.