Beispiel #1
0
 public PFGridColumn(StoreColumn c)
 {
     this.DataIndex = c.data;
     this.Text      = c.title ?? c.data;
     this.Width     = c.width;
     this.Visible   = c.visible;
     if (!this.Visible)
     {
         SetClassName("col-h");
     }
     if (!string.IsNullOrWhiteSpace(c.dataType))
     {
         var dataType = PFDataHelper.GetTypeByString(c.dataType);
         SetStyleByDataType(this, dataType);
         //bool isPercent = dataType == typeof(PFPercent);
         //if (dataType == typeof(decimal) || dataType == typeof(int) || isPercent)
         //{
         //    SetStyle("text-align:right;padding-right: 9px");
         //    Render = (cc, r, v) =>
         //    {
         //        var rr = PFDataHelper.Thousandth(v);
         //        if (isPercent)
         //        {
         //            rr += " %";
         //        }
         //        return rr;
         //    };
         //    SetClassName("col-r");
         //}
     }
 }