public static FormatValueType?GetValueType(PropertyInfo propertyInfo) { var type = DynamicDataPropertyHandlerBase.UnwrapNullableType(propertyInfo.PropertyType); if (numericTypes.Contains(type)) { return(FormatValueType.Number); } else if (dateTypes.Contains(type)) { return(FormatValueType.DateTime); } if (stringTypes.Contains(type)) { return(FormatValueType.Text); } return(null); }
public static bool CanHandleProperty(PropertyInfo propertyInfo, DynamicDataContext context) { var type = DynamicDataPropertyHandlerBase.UnwrapNullableType(propertyInfo.PropertyType); return(stringTypes.Contains(type) || numericTypes.Contains(type) || dateTypes.Contains(type)); }