示例#1
0
 private static List<WebGridColumn> AddColumnsToGrid(IEnumerable<WebGridColumn> columns, int checkBoxColumnPosition, WebGridColumn newVisibleCheckBoxColumn, WebGridColumn newInvisibleCheckBoxColumn)
 {
     var newColumns = columns.ToList();
     newColumns.Insert(checkBoxColumnPosition, newVisibleCheckBoxColumn);
     newColumns.Insert(checkBoxColumnPosition + 1, newInvisibleCheckBoxColumn);
     return newColumns;
 }
 public GenericWebGridColumn(WebGridColumn baseColumn)
 {
     ColumnName = baseColumn.ColumnName;
     Header     = baseColumn.Header;
     Format     = baseColumn.Format;
     Style      = baseColumn.Style;
     CanSort    = baseColumn.CanSort;
 }
示例#3
0
 public GenericWebGridColumnCheckBox(WebGridColumn baseColumn, bool ShowSelectAll = true)
 {
     ColumnName    = baseColumn.ColumnName;
     Header        = baseColumn.Header;
     Format        = baseColumn.Format;
     Style         = baseColumn.Style;
     CanSort       = baseColumn.CanSort;
     showSelectAll = ShowSelectAll;
 }
 private static bool ShowSortableColumnHeader(
     WebGrid grid,
     WebGridColumn column
     )
 {
     return(grid.CanSort &&
            column.CanSort &&
            !column.ColumnName.IsEmpty());
 }
示例#5
0
 private static string GetTableCellHtml(WebGridColumn column, string innerHtml) {
     TagBuilder td = new TagBuilder("td");
     if (!String.IsNullOrEmpty(column.Style)) {
         td.MergeAttribute("class", column.Style);
     }
     td.InnerHtml = innerHtml;
     return td.ToString();
 }
//------------------------------------------------------------------------------
 private static bool ShowSortableColumnHeader(WebGrid grid, WebGridColumn column)
 {
     return grid.CanSort && column.CanSort && !column.ColumnName.IsEmpty();
 }