Log In
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Collapse]eXpressApp Framework
 [Expand]Getting Started
 [Expand]Design-Time Features
 [Collapse]Task-Based Help
  [Expand]Business Model Design
  [Expand]Application Model
  [Expand]List Editors
  [Expand]Property Editors
  [Collapse]Scheduler and Notifications
    How to: Access the List Editor's Control
    How to: Perform Custom Actions When a Recurring Event's Exceptional Occurrence is Created
    How to: Show Notifications to a Specific User
    How to: Show Various Notifications for Multiple Users
    How to: Use Notifications with a Custom Business Class (Implement ISupportNotifications)
    How to: Use Notifications with the Scheduler Event
  [Expand]Miscellaneous UI Customizations
  Frequently Asked Questions (FAQ)
 [Expand]API Reference
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
This documentation page describes implementations made in our v17.2 release cycle. To learn about functionality shipping with v18.1, navigate to our updated help file experience at docs.devexpress.com. Learn More

How to: Show Various Notifications for Multiple Users

When you implement notifications in your application, one instance of notification class is created and displayed to each user by default. In the case that one user modifies this notification, for example using the Snooze or Dismiss Action, this notification is modified for all users. Create various notifications to multiple users as described in this topic to allow users use these Actions without collisions.


Assume you have an application with the Security System enabled. The MyNotification class implements the ISupportNotifications interface and exposes the AssignedTo and MyTask properties.

The MyTask property is an object of the custom MyTask type. The MyTask class has the MyNotifications aggregated collection of notifications that is a part of the one-to-many relationship.


If you use the Event class from the Business Class Library with the Scheduler Module instead of the custom ISupportNotifications object, the Scheduler features (for example, the RecurringReminder functionality) are unworkable. To avoid this, you should create a separate Event instance for each user.

Edit the Module.cs (Module.vb) file. In the overridden ModuleBase.Setup method, subscribe to the XafApplication.LoggedOn event. In this event handler, get the NotificationsModule instance and subscribe to the DefaultNotificationsProvider.CustomizeNotificationCollectionCriteria event.

As a result, various notifications display for different users if the AssignedTo value refers to the user or same notification for all users if the AssignedTo value is empty.

Create the Controller which is a WinNotificationsMessageListViewController descendant in a WinForms application or WebNotificationsMessageListViewController in an ASP.NET application if you want to open the corresponding MyTask Detail View when double clicking a notification in the notification window. The example below demonstrates this Controller implementation for the WinForms application.

If you need to delete a notification when a user dismisses it, create a new ObjectViewController<ViewType, ObjectType> as demonstrated below.

Is this topic helpful?​​​​​​​