Class GridView
public class GridView : ViewGroup
Inherited Members
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 SourceGridView(String)
Create a new instance of a grid view with an ID
Declaration
[JsonConstructor]
protected GridView(string id)
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 |
GridView(String, String)
Create a new instance of a grid view with an ID and Name
Declaration
public GridView(string id, string name = null)
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
[JsonProperty("rows")]
List<GridRow> _rows
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<GridRow> |
Methods
View SourceAddRow(GridRow)
Add a row to the group
Declaration
public void AddRow(GridRow row)
Parameters
Type | Name | Description |
---|---|---|
GridRow | row |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when the specified row is null |
AddView(AbstractView)
Add a view to the grid The view will be aded as a single row.
Declaration
public override void AddView(AbstractView view)
Parameters
Type | Name | Description |
---|---|---|
AbstractView | view |
Overrides
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 |
AddViews(IEnumerable<AbstractView>)
Add multiple views to the grid The views will be added as stacked rows
Declaration
public override void AddViews(IEnumerable<AbstractView> views)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<AbstractView> | views |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when the specified collection of views is null |
RemoveAllViews()
Clear a collection of views
Declaration
public override void RemoveAllViews()
Overrides
View SourceSetViews(IEnumerable<AbstractView>)
Set the list of views in this group
Declaration
public override void SetViews(IEnumerable<AbstractView> views)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<AbstractView> | views |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The list of views is null |
ToHtml(Int32)
Get a string representation of this view converted into HTML
Declaration
public override string ToHtml(int indent = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | indent |
Returns
Type | Description |
---|---|
System.String | An HTML representation of the view as a string |