The requested page is not available for the requested platform. You are viewing the content for Default platform.

ObjectFormatter.CustomGetValue Event

Occurs when the ObjectFormatter.Format method processes a format item. Allows you to provide a custom value that will replace the format item in the resulting string.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public static event EventHandler<CustomGetValueEventArgs> CustomGetValue
Public Shared Event CustomGetValue As EventHandler(Of CustomGetValueEventArgs)

Event Data

The CustomGetValue event handler receives an argument of the CustomGetValueEventArgs type. The following properties provide information specific to this event.

Property Description
MemberPath Returns the name of the property that is being queried for its value.
Object Returns an object whose property value must replace the currently processed format item in the format string.
Value Returns the custom value that must replace the corresponding format item in the string processed by the ObjectFormatter.Format method.

Remarks

When the Format method processes a format item, it retrieves the required property value, and replaces the format item with it. If you need to replace a specific format item with a custom value, handle this event. Pass the custom value to the handler's CustomGetValueEventArgs.Value parameter. Set the handler's CustomGetValueEventArgs.Handled parameter to true, to indicate that you have supplied the custom value. Otherwise, the Format will handle the retrieval of the property's value.

See Also