Ext.NET  5.3.0
.NET Component Framework for Enterprise Level Apps
Ext.Net.MetaConfig Class Reference

The server can return metadata in its response, in addition to the record data, that describe attributes of the data set itself or are used to reconfigure the Reader. To pass metadata in the response you simply add a metaData attribute to the root of the response data. The metaData attribute can contain anything, but supports a specific set of properties that are handled by the Reader if they are present: More...

Inheritance diagram for Ext.Net.MetaConfig:
Ext.Net.BaseItem Ext.Net.IXObject Ext.Net.IBase

Public Member Functions

virtual string Serialize ()
 
- Public Member Functions inherited from Ext.Net.BaseItem
virtual bool HasExplicitValue (string name)
 
void EnsureDataBind ()
 
virtual void Call (string name)
 
virtual void Call (string name, params object[] args)
 
virtual void AddScript (string script)
 
virtual void AddScript (string script, params object[] args)
 
virtual bool IsEmptyObject ()
 
Apply< T > (IApply config)
 
BaseItem Apply (object config)
 
virtual void LoadViewState (object state)
 
virtual object SaveViewState ()
 
virtual void TrackViewState ()
 
void SetDirty ()
 
virtual void DataBind ()
 
virtual IControlBuilder ToNativeBuilder ()
 

Static Public Member Functions

static MetaConfig From (object data, bool createColumns)
 
static MetaConfig From (object data)
 

Properties

virtual string RootProperty [get, set]
 The name of the property which contains the Array of row objects. For JSON reader it's dot-separated list of property names. For XML reader it's a CSS selector. For array reader it's not applicable. By default the natural root of the data will be used. The root Json array, the root XML element, or the array. The data packet value for this property should be an empty array to clear the data or show no data. Defaults to: "" More...
 
virtual string IDProperty [get, set]
 Name of the property within a row object that contains a record identifier value. Defaults to The id of the model. If an idProperty is explicitly specified it will override that of the one specified on the model More...
 
virtual string TotalProperty [get, set]
 Name of the property from which to retrieve the total number of records in the dataset. This is only needed if the whole dataset is not passed in one go, but is being paged from the remote server. Defaults to total. More...
 
virtual string SuccessProperty [get, set]
 Name of the property from which to retrieve the success attribute. Defaults to success. See Ext.data.proxy.Proxy.exception for additional information. More...
 
virtual string MessageProperty [get, set]
 The name of the property which contains a response message. This property is optional. More...
 
virtual ModelFieldCollection Fields [get]
 The fields for this model. This is an Array of Field definition objects. A Field definition may simply be the name of the Field, but a Field encapsulates data type, custom conversion of raw data, and a mapping property to specify by name of index, how to extract a field's value from a raw data object, so it is best practice to specify a full set of Field config objects. More...
 
virtual ValidatorCollection?? Validations [get]
 Models validations More...
 
virtual ItemsCollection< ColumnBaseColumns [get]
 An array of column definition objects which define all columns that appear in this grid. Each column definition provides the header text for the column, and a definition of where the data for that column comes from. More...
 
bool IsRowEditing [get, set]
 
virtual string ColumnsProxy [get]
 
override ConfigOptionsCollection ConfigOptions [get]
 
- Properties inherited from Ext.Net.BaseItem
virtual string InstanceOf [get]
 
ItemState State [get]
 
virtual DefaultValueMode DefaultValueMode [get, set]
 
virtual bool DesignMode [get]
 
bool AutoDataBind [get, set]
 
ResourceManager ResourceManager [get]
 
virtual Control Owner [get, set]
 The Owner Control for this Listener. More...
 
virtual bool IsDefault [get]
 Does this object currently represent it's default state. More...
 
bool IsTrackingViewState [get]
 
EventHandlerList Events [get]
 
EventHandler DataBinding
 
Control?? BindingContainer [get]
 
virtual ConfigItemCollection?? CustomConfig [get]
 Collection of custom js config More...
 
virtual ConfigOptionsCollection ConfigOptions [get]
 
virtual ConfigOptionsExtraction ConfigOptionsExtraction [get]
 
System.Web.Mvc.HtmlHelper?? HtmlHelper [get, set]
 
- Properties inherited from Ext.Net.IXObject
ConfigOptionsCollection ConfigOptions [get]
 
ConfigOptionsExtraction ConfigOptionsExtraction [get]
 
DefaultValueMode DefaultValueMode [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from Ext.Net.BaseItem
 BaseItem (Control owner)
 
 BaseItem ()
 
virtual void OwnerUpdate (Control owner)
 
virtual void OnDataBinding (EventArgs e)
 

Detailed Description

The server can return metadata in its response, in addition to the record data, that describe attributes of the data set itself or are used to reconfigure the Reader. To pass metadata in the response you simply add a metaData attribute to the root of the response data. The metaData attribute can contain anything, but supports a specific set of properties that are handled by the Reader if they are present:

root: the property name of the root response node containing the record data idProperty: property name for the primary key field of the data totalProperty: property name for the total number of records in the data successProperty: property name for the success status of the response messageProperty: property name for an optional response message fields: Config used to reconfigure the Model's fields before converting the response data into records

The Reader will automatically read the meta fields config and rebuild the Model based on the new fields, but to handle the new column configuration you would need to handle the metadata within the application code. This is done simply enough by handling the metachange event on either the store or the proxy

Member Function Documentation

◆ From() [1/2]

static MetaConfig Ext.Net.MetaConfig.From ( object  data)
inlinestatic

◆ From() [2/2]

static MetaConfig Ext.Net.MetaConfig.From ( object  data,
bool  createColumns 
)
inlinestatic

◆ Serialize()

virtual string Ext.Net.MetaConfig.Serialize ( )
inlinevirtual

Property Documentation

◆ Columns

virtual ItemsCollection<ColumnBase> Ext.Net.MetaConfig.Columns
get

An array of column definition objects which define all columns that appear in this grid. Each column definition provides the header text for the column, and a definition of where the data for that column comes from.

◆ ColumnsProxy

virtual string Ext.Net.MetaConfig.ColumnsProxy
getprotected

◆ ConfigOptions

override ConfigOptionsCollection Ext.Net.MetaConfig.ConfigOptions
get

◆ Fields

virtual ModelFieldCollection Ext.Net.MetaConfig.Fields
get

The fields for this model. This is an Array of Field definition objects. A Field definition may simply be the name of the Field, but a Field encapsulates data type, custom conversion of raw data, and a mapping property to specify by name of index, how to extract a field's value from a raw data object, so it is best practice to specify a full set of Field config objects.

◆ IDProperty

virtual string Ext.Net.MetaConfig.IDProperty
getset

Name of the property within a row object that contains a record identifier value. Defaults to The id of the model. If an idProperty is explicitly specified it will override that of the one specified on the model

◆ IsRowEditing

bool Ext.Net.MetaConfig.IsRowEditing
getset

◆ MessageProperty

virtual string Ext.Net.MetaConfig.MessageProperty
getset

The name of the property which contains a response message. This property is optional.

◆ RootProperty

virtual string Ext.Net.MetaConfig.RootProperty
getset

The name of the property which contains the Array of row objects. For JSON reader it's dot-separated list of property names. For XML reader it's a CSS selector. For array reader it's not applicable. By default the natural root of the data will be used. The root Json array, the root XML element, or the array. The data packet value for this property should be an empty array to clear the data or show no data. Defaults to: ""

◆ SuccessProperty

virtual string Ext.Net.MetaConfig.SuccessProperty
getset

Name of the property from which to retrieve the success attribute. Defaults to success. See Ext.data.proxy.Proxy.exception for additional information.

◆ TotalProperty

virtual string Ext.Net.MetaConfig.TotalProperty
getset

Name of the property from which to retrieve the total number of records in the dataset. This is only needed if the whole dataset is not passed in one go, but is being paged from the remote server. Defaults to total.

◆ Validations

virtual ValidatorCollection?? Ext.Net.MetaConfig.Validations
get

Models validations


The documentation for this class was generated from the following files: