ISchedulerMappingConverter Interface
Enables you to apply custom logic to a mapping.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v18.1.Core.dll
Declaration
Related API Members
The following members accept/return ISchedulerMappingConverter objects:
Remarks
You can associate a mapping converter with a mapping. Create a class that implements the ISchedulerMappingConverter interface, instantiate it and assign it to a related property as described in the Mapping Converters document.
Example
Note
A complete sample project is available at https://github.com/DevExpress-Examples/mapping-converters-an-example-of-use-t497864
class MappingConverterStart : ISchedulerMappingConverter {
public object Convert(object obj, Type targetType, object parameter) {
return DateTime.ParseExact(obj.ToString(), "s", System.Globalization.DateTimeFormatInfo.InvariantInfo);
}
public object ConvertBack(object obj, Type targetType, object parameter) {
return ((DateTime)obj).ToString("s");
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ISchedulerMappingConverter interface.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.