예제 #1
0
        public BoundColumn <R> Bound <R>(Expression <Func <T, R> > exp)
        {
            var col = new BoundColumn <R>(exp.Body as MemberExpression);

            columns.Add(col);
            return(col);
        }
예제 #2
0
 public static BoundColumn <T> Enum <T>(this BoundColumn <T> column) where T : struct
 {
     if (typeof(T).IsEnum)
     {
         column.SetRender(new EnumRenderer(typeof(T)));
     }
     return(column);
 }
예제 #3
0
 public static BoundColumn <bool> YesNoClass(this BoundColumn <bool> column, string template, string yesClasses, string noClasses)
 {
     column.SetRender(new YesNoClassRenderer(column.Exp.Member, template, yesClasses, noClasses));
     return(column);
 }
예제 #4
0
 public static BoundColumn <DateTime?> Date(this BoundColumn <DateTime?> column, string format)
 {
     column.SetRender(new NullableDateTimeRenderer(format));
     return(column);
 }