Example #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);
     };
 }
Example #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);
     };
 }
Example #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);
     };
 }
Example #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;
 }
Example #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;
 }