Back to Devexpress

XPView.ResolveSession Event

xpo-devexpress-dot-xpo-dot-xpview-266563bc.md

latest2.1 KB
Original Source

XPView.ResolveSession Event

Enables the view to be associated with a session.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public event ResolveSessionEventHandler ResolveSession
vb
Public Event ResolveSession As ResolveSessionEventHandler

Event Data

The ResolveSession event's data class is ResolveSessionEventArgs. The following properties provide information specific to this event:

PropertyDescription
SessionSpecifies the session to be used to load and save persistent objects.

Remarks

The ResolveSession event is raised when the view whose XPView.Session property isn’t specified, requests a session that represents a data store where persistent objects are stored. Handle this event to associate the view with a session. This can be useful when you create an XPView at design time and want to associate it with a session (unit of work) created at runtime.

If the session isn’t specified, the view works with the default session (Session.DefaultSession).

Note

Do not change the view’s XPView.Session property manually in code, as it is intended to provide design-time support for the component. A session that the view will work with can be initialized in the XPView‘s constructor or within the ResolveSession event handler.

See Also

ResolveSession

XPView Class

XPView Members

DevExpress.Xpo Namespace