C# Class Skybrud.Umbraco.GridData.GridDataModel

Class representing the value/model saved by an Umbraco Grid property.
Inheritance: Skybrud.Umbraco.GridData.Json.GridJsonObject
Datei anzeigen Open project: skybrud/Skybrud.Umbraco.GridData Class Usage Examples

Private Properties

Property Type Description
GridDataModel System
Parse GridDataModel

Public Methods

Method Description
Deserialize ( string json ) : GridDataModel

Deserializes the specified JSON string into an instance of GridDataModel.

Deserialize ( string json, string propertyTypeAlias ) : GridDataModel

Deserializes the specified JSON string into an instance of GridDataModel.

GetAllControls ( ) : GridControl[]

Gets an array of all nested controls.

GetAllControls ( bool>.Func predicate ) : GridControl[]

Gets an array of all nested controls matching the specified predicate.

GetAllControls ( string alias ) : GridControl[]

Gets an array of all nested controls with the specified editor alias.

GetEmptyModel ( ) : GridDataModel

Gets an empty (and invalid) model. This method can be used to get a fallback value for when an actual Grid model isn't available.

GetEmptyModel ( string propertyTypeAlias ) : GridDataModel

Gets an empty (and invalid) model. This method can be used to get a fallback value for when an actual Grid model isn't available.

GetHtml ( HtmlHelper helper ) : System.Web.HtmlString

Generates the HTML for the Grid model.

GetHtml ( HtmlHelper helper, string framework ) : System.Web.HtmlString

Generates the HTML for the Grid model.

Private Methods

Method Description
GridDataModel ( Newtonsoft.Json.Linq.JObject obj ) : System
Parse ( Newtonsoft.Json.Linq.JObject obj ) : GridDataModel

Method Details

Deserialize() public static method

Deserializes the specified JSON string into an instance of GridDataModel.
public static Deserialize ( string json ) : GridDataModel
json string The JSON string to be deserialized.
return GridDataModel

Deserialize() public static method

Deserializes the specified JSON string into an instance of GridDataModel.
public static Deserialize ( string json, string propertyTypeAlias ) : GridDataModel
json string The JSON string to be deserialized.
propertyTypeAlias string The alias of the property the Grid model is representing.
return GridDataModel

GetAllControls() public method

Gets an array of all nested controls.
public GetAllControls ( ) : GridControl[]
return GridControl[]

GetAllControls() public method

Gets an array of all nested controls matching the specified predicate.
public GetAllControls ( bool>.Func predicate ) : GridControl[]
predicate bool>.Func The predicate (callback function) used for comparison.
return GridControl[]

GetAllControls() public method

Gets an array of all nested controls with the specified editor alias.
public GetAllControls ( string alias ) : GridControl[]
alias string The editor alias of controls to be returned.
return GridControl[]

GetEmptyModel() public static method

Gets an empty (and invalid) model. This method can be used to get a fallback value for when an actual Grid model isn't available.
public static GetEmptyModel ( ) : GridDataModel
return GridDataModel

GetEmptyModel() public static method

Gets an empty (and invalid) model. This method can be used to get a fallback value for when an actual Grid model isn't available.
public static GetEmptyModel ( string propertyTypeAlias ) : GridDataModel
propertyTypeAlias string The alias of the property the Grid model is representing.
return GridDataModel

GetHtml() public method

Generates the HTML for the Grid model.
public GetHtml ( HtmlHelper helper ) : System.Web.HtmlString
helper HtmlHelper The HTML helper used for rendering the Grid.
return System.Web.HtmlString

GetHtml() public method

Generates the HTML for the Grid model.
public GetHtml ( HtmlHelper helper, string framework ) : System.Web.HtmlString
helper HtmlHelper The HTML helper used for rendering the Grid.
framework string The framework used to render the Grid.
return System.Web.HtmlString