Ejemplo n.º 1
0
 public static void RowEnd <T>(this IGridSections <T> sections, Action <T> block) where T : class
 {
     sections.Row.EndSectionRenderer = (rowData, context) =>
     {
         block(rowData.Item);
         return(true);
     };
 }
Ejemplo n.º 2
0
 public static void RowStart <T>(this IGridSections <T> sections, Action <T, GridRowViewData <T> > block) where T : class
 {
     sections.Row.StartSectionRenderer = (rowData, context) =>
     {
         block(rowData.Item, rowData);
         return(true);
     };
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Renders the specified text at the end of every row instead of the default output.
 /// </summary>
 public static void RowEnd <T>(this IGridSections <T> sections, Func <GridRowViewData <T>, string> rowEnd) where T : class
 {
     sections.Row.EndSectionRenderer = (rowData, context) =>
     {
         context.Writer.Write(rowEnd(rowData));
         return(true);
     };
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Associates custom attributes with every grid row.
 /// </summary>
 public static void RowAttributes <T>(this IGridSections <T> sections, Func <GridRowViewData <T>, IDictionary <string, object> > attributes) where T : class
 {
     sections.Row.Attributes = attributes;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Specifies custom attributes for the header row.
 /// </summary>
 public static void HeaderRowAttributes <T>(this IGridSections <T> sections, IDictionary <string, object> attributes) where T : class
 {
     sections.HeaderRow.Attributes = x => attributes;
 }