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); }; }
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); }; }
/// <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); }; }
/// <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; }
/// <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; }