/// <summary> /// Sets the default formatting for an excel column based on the field type and data type /// </summary> /// <param name="field">The grid field</param> /// <param name="exportValue">An example value for this column; you can use the data from the first row</param> /// <returns></returns> public static string DefaultColumnFormat(IRockGridField field, object exportValue) { if (field is CurrencyField) { return(DecimalFormat); } return(DefaultColumnFormat(exportValue?.GetType())); }
/// <summary> /// Sets the default formatting for an excel column based on the field type and data type /// </summary> /// <param name="field">The grid field</param> /// <param name="exportValue">An example value for this column; you can use the data from the first row</param> /// <returns></returns> public static string DefaultColumnFormat( IRockGridField field, object exportValue ) { if ( field is CurrencyField ) { return DecimalFormat; } return DefaultColumnFormat( exportValue?.GetType() ); }