GridColumn-Klasse
Stellt den visuellen Aspekt einer Spalte im Raster angezeigt werden.
Vererbungshierarchie
System.Object
Microsoft.SharePoint.JSGrid.BaseGridColumn
Microsoft.SharePoint.JSGrid.GridColumn
Namespace: Microsoft.SharePoint.JSGrid
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Class GridColumn _
Inherits BaseGridColumn
'Usage
Dim instance As GridColumn
public class GridColumn : BaseGridColumn
Hinweise
Dieser Codeausschnitt veranschaulicht Einstellung Spaltennamen, Breiten und gibt an, ob eine Spalte ausgeblendet oder sortiert werden kann.
List<GridColumn> r = new List<GridColumn>();
foreach (DataColumn iterator in table.Columns)
{
if (iterator.ColumnName != "Key")
{
GridColumn col = new GridColumn();
//point it at a fieldKey name
col.FieldKey = iterator.ColumnName;
//give the column header a name
col.Name = iterator.ColumnName;
//define the column width
col.Width = 110;
//define column settings
if (iterator.ColumnName == "Department")
{
col.IsHidable = false;
}
if (iterator.ColumnName == "Yearly Estimate")
{
col.IsSortable = true;
}
//add the column
r.Add(col);
}
}
Finden Sie unter PivotedGridColumn.
Threadsicherheit
Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Die Threadsicherheit von Instanzmembern ist nicht gewährleistet.