Search Results for

    Show / Hide Table of Contents

    Class GridView

    • C#
    • Visual Basic
    public class GridView : ViewGroup
    Public Class GridView
        Inherits ViewGroup
    Inheritance
    System.Object
    AbstractView
    ViewGroup
    GridView
    Inherited Members
    ViewGroup.Views
    ViewGroup.ViewIds
    ViewGroup.ViewCount
    ViewGroup._views
    ViewGroup._viewIds
    ViewGroup.ContainsViewWithId(String)
    ViewGroup.GetViewById(String)
    ViewGroup.GetViewById<TViewType>(String)
    ViewGroup.GetStringValue()
    ViewGroup.UpdateViewById(AbstractView)
    ViewGroup.UpdateViewValueById(String, String)
    ViewGroup.MapViewIds()
    ViewGroup.Update(AbstractView)
    AbstractView.Id
    AbstractView.Name
    AbstractView.Type
    AbstractView.HtmlIndent
    AbstractView.NonAllowedCharactersForId
    AbstractView.UpdateValue(String)
    AbstractView.GetIndentStringFromNumber(Int32)
    AbstractView.IdContainsNonAllowedCharacters()
    AbstractView.ShallowCopy()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: HomeSeer.Jui.Views
    Assembly: PluginSdk.dll


    A grid view defines a sub-grouping of views with a header. It uses the bootstrap grid system to layout the views within the group


    Constructors

    View Source

    GridView(String)

    Create a new instance of a grid view with an ID

    Declaration
    • C#
    • Visual Basic
    [JsonConstructor]
    protected GridView(string id)
    <JsonConstructor>
    Protected Sub New(id As String)
    Parameters
    Type Name Description
    System.String id

    The unique ID of the group

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if a view is created with an invalid ID

    View Source

    GridView(String, String)

    Create a new instance of a grid view with an ID and Name

    Declaration
    • C#
    • Visual Basic
    public GridView(string id, string name = null)
    Public Sub New(id As String, name As String = Nothing)
    Parameters
    Type Name Description
    System.String id

    The unique ID of the group

    System.String name

    The name of the group. DEFAULT: null

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if a view is created with an invalid ID

    Fields

    View Source

    _rows

    The rows to display within this group.

    Declaration
    • C#
    • Visual Basic
    [JsonProperty("rows")]
    List<GridRow> _rows
    <JsonProperty("rows")>
    _rows As List(Of GridRow)
    Field Value
    Type Description
    System.Collections.Generic.List<GridRow>

    Methods

    View Source

    AddRow(GridRow)

    Add a row to the group

    Declaration
    • C#
    • Visual Basic
    public void AddRow(GridRow row)
    Public Sub AddRow(row As GridRow)
    Parameters
    Type Name Description
    GridRow row
    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the specified row is null

    View Source

    AddView(AbstractView)

    Add a view to the grid The view will be aded as a single row.

    Declaration
    • C#
    • Visual Basic
    public override void AddView(AbstractView view)
    Public Overrides Sub AddView(view As AbstractView)
    Parameters
    Type Name Description
    AbstractView view
    Overrides
    ViewGroup.AddView(AbstractView)
    Exceptions
    Type Condition
    System.ArgumentNullException

    The view or its ID is null

    System.ArgumentException

    There is already a view with the same ID present in the collection

    System.InvalidOperationException

    Thrown when trying to add a ViewGroup to another ViewGroup

    ViewTypeMismatchException

    Thrown when a view group's type does not match its class

    View Source

    AddViews(IEnumerable<AbstractView>)

    Add multiple views to the grid The views will be added as stacked rows

    Declaration
    • C#
    • Visual Basic
    public override void AddViews(IEnumerable<AbstractView> views)
    Public Overrides Sub AddViews(views As IEnumerable(Of AbstractView))
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<AbstractView> views
    Overrides
    ViewGroup.AddViews(IEnumerable<AbstractView>)
    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown when the specified collection of views is null

    View Source

    RemoveAllViews()

    Clear a collection of views

    Declaration
    • C#
    • Visual Basic
    public override void RemoveAllViews()
    Public Overrides Sub RemoveAllViews
    Overrides
    ViewGroup.RemoveAllViews()
    View Source

    SetViews(IEnumerable<AbstractView>)

    Set the list of views in this group

    Declaration
    • C#
    • Visual Basic
    public override void SetViews(IEnumerable<AbstractView> views)
    Public Overrides Sub SetViews(views As IEnumerable(Of AbstractView))
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<AbstractView> views
    Overrides
    ViewGroup.SetViews(IEnumerable<AbstractView>)
    Exceptions
    Type Condition
    System.ArgumentNullException

    The list of views is null

    View Source

    ToHtml(Int32)

    Get a string representation of this view converted into HTML

    Declaration
    • C#
    • Visual Basic
    public override string ToHtml(int indent = 0)
    Public Overrides Function ToHtml(indent As Integer = 0) As String
    Parameters
    Type Name Description
    System.Int32 indent
    Returns
    Type Description
    System.String

    An HTML representation of the view as a string

    Overrides
    ViewGroup.ToHtml(Int32)
    • View Source
    In This Article
    Back to top HomeSeer Technologies