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.v24.1.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Event Data
The CustomGetValue event's data class is CustomGetValueEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
CaptionHelper | |
Handled | Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs. |
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.