Click or drag to resize
CalculationWorks Logo
String Trim Converter
Trim Strings with IBcfColumnValueConverter

The example shows a converter. It removes all leading and trailing white-space characters from the value before it is set.

public class StringTrimConverter : BcfColumnBehaviorItemBase, IBcfColumnValueConverter {
    public object ConvertValue(object value) {
        if (value == null) return null;
        var myValue = Convert.ToString(value);
        return myValue.Trim();
See Also