Partilhar via


GridField Class

Represents a field of data in the grid.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.JSGrid.GridField

Namespace:  Microsoft.SharePoint.JSGrid
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Class GridField _
    Implements IJsonSerializable
'Usage
Dim instance As GridField
public class GridField : IJsonSerializable

Remarks

This object contains the information and functionality that is required to configure a field of data in the grid. A GridField refers to the configuration of the data portion of a field. For example, whether the data can be edited. This is in contrast to a GridColumn, which controls the visual representation of the field, for example, the width of the column.

foreach (DataColumn iterator in table.Columns)
            {
                GridField field = new GridField();
                field.FieldKey = iterator.ColumnName;
                
                //Fill In required fields for grid Proptypes
                if (iterator.ColumnName != "Key")
                    field = formatGridField(field, iterator);   
                else
                    field.SerializeDataValue = true;
                r.Add(field);
            }
For Each iterator As DataColumn In table.Columns
    Dim field As New GridField()
    field.FieldKey = iterator.ColumnName
    'Fill In required fields for grid Proptypes
    If iterator.ColumnName <> "Key" Then
        field = formatGridField(field, iterator)
    Else
        field.SerializeDataValue = True
    End If
    r.Add(field)
Next iterator

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

GridField Members

Microsoft.SharePoint.JSGrid Namespace