public static void SetStyleByDataType(PFGridColumn c, Type dataType) { bool isPercent = dataType == typeof(PFPercent); if (dataType == typeof(decimal) || dataType == typeof(int) || isPercent) { c.SetStyle("text-align:right;padding-right: 9px"); c.Render = (cc, r, v) => { var rr = PFDataHelper.Thousandth(v); if (isPercent) { rr += " %"; } return(rr); }; c.SetClassName("col-r"); } }