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