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

More...

Inheritance diagram for Ext.Net.MVC.ModelFieldAttribute:
Ext.Net.MVC.VirtualModelField

Public Member Functions

 ModelFieldAttribute ()
 
virtual void OnMetadataCreated (ModelMetadata metadata)
 
void CopyTo (ModelField field, Model model)
 

Static Public Attributes

const string KEY = "__ext.net.modelfield"
 

Properties

virtual bool AllowNull [get, set]
 Use when converting received data into an int, float, bool or string type. If the value cannot be parsed, null will be used if allowNull is true, otherwise a default value for that type will be used: More...
 
virtual bool IDProperty [get, set]
 
virtual bool Ignore [get, set]
 
virtual bool IgnoreRequiredDataAnnotation [get, set]
 
virtual string Name [get, set]
 The name by which the field is referenced within the Model. This is referenced by, for example, the dataIndex property in column definition objects passed to Ext.grid.header.Container. Note: In the simplest case, if no properties other than name are required, a field definition may consist of just a String for the field name. More...
 
virtual string Mapping [get, set]
 A path expression for use by the Ext.data.reader.Reader implementation that is creating the Model to extract the Field value from the data object. If the path expression is the same as the field name, the mapping may be omitted. More...
 
virtual string ServerMapping [get, set]
 
virtual ModelFieldType Type [get, set]
 (Optional) The data type for automatic conversion from received data to the stored value if convert has not been specified. This may be specified as a string value. Possible values are More...
 
virtual SortTypeMethod SortType [get, set]
 A function which converts a Field's value to a comparable value in order to ensure correct sort ordering. Predefined functions are provided in Ext.data.SortTypes. More...
 
virtual SortDirection SortDir [get, set]
 Initial direction to sort ("ASC" or "DESC"). Defaults to "ASC". More...
 
virtual EmptyValue SubmitEmptyValue [get, set]
 Empty value representation during saving (default value as None) More...
 
virtual string CustomSortHandler [get, set]
 A function which converts a Field's value to a comparable value in order to ensure correct sort ordering. More...
 
virtual string SerializeHandler [get, set]
 A function which converts the Model's value for this Field into a form which can be used by whatever Writer is being used to sync data with the server. More...
 
virtual string ConvertHandler [get, set]
 (Optional) A function which converts the value provided by the Reader into an object that will be stored in the Model. More...
 
virtual bool NullConvert [get, set]
 If you ensure that data comes with correct format then convert can be set to null, it increase a parsing performance More...
 
virtual bool RenderMilliseconds [get, set]
 
virtual string DateFormat [get, set]
 (Optional) Used when converting received data into a Date when the type is specified as "date". More...
 
virtual object DefaultValue [get, set]
 (Optional) The default value used when a Model is being created by a Reader when the item referenced by the mapping does not exist in the data object (i.e. undefined). (defaults to "") More...
 
virtual bool IsComplex [get, set]
 True to render this property as complex object More...
 
virtual bool Persist [get, set]
 False to exclude this field from the Ext.data.Model.modified fields in a model. This will also exclude the field from being written using a Ext.data.writer.Writer. This option is useful when model fields are used to keep state on the client but do not need to be persisted to the server. Defaults to true. More...
 
virtual bool UseNull [get, set]
 Use when converting received data into a Number type (either int or float). If the value cannot be parsed, null will be used if useNull is true, otherwise the value will be 0. Defaults to false. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ ModelFieldAttribute()

Ext.Net.MVC.ModelFieldAttribute.ModelFieldAttribute ( )
inline

Member Function Documentation

◆ CopyTo()

void Ext.Net.MVC.ModelFieldAttribute.CopyTo ( ModelField  field,
Model  model 
)
inline

◆ OnMetadataCreated()

virtual void Ext.Net.MVC.ModelFieldAttribute.OnMetadataCreated ( ModelMetadata  metadata)
inlinevirtual

Reimplemented in Ext.Net.MVC.VirtualModelField.

Member Data Documentation

◆ KEY

const string Ext.Net.MVC.ModelFieldAttribute.KEY = "__ext.net.modelfield"
static

Property Documentation

◆ AllowNull

virtual bool Ext.Net.MVC.ModelFieldAttribute.AllowNull
getset

Use when converting received data into an int, float, bool or string type. If the value cannot be parsed, null will be used if allowNull is true, otherwise a default value for that type will be used:

  • for int and float - 0.
  • for string - "". -for bool - false.

Note that when parsing of date type fails, the value will be null regardless of this setting. Defaults to: false

◆ ConvertHandler

virtual string Ext.Net.MVC.ModelFieldAttribute.ConvertHandler
getset

(Optional) A function which converts the value provided by the Reader into an object that will be stored in the Model.

◆ CustomSortHandler

virtual string Ext.Net.MVC.ModelFieldAttribute.CustomSortHandler
getset

A function which converts a Field's value to a comparable value in order to ensure correct sort ordering.

◆ DateFormat

virtual string Ext.Net.MVC.ModelFieldAttribute.DateFormat
getset

(Optional) Used when converting received data into a Date when the type is specified as "date".

◆ DefaultValue

virtual object Ext.Net.MVC.ModelFieldAttribute.DefaultValue
getset

(Optional) The default value used when a Model is being created by a Reader when the item referenced by the mapping does not exist in the data object (i.e. undefined). (defaults to "")

◆ IDProperty

virtual bool Ext.Net.MVC.ModelFieldAttribute.IDProperty
getset

◆ Ignore

virtual bool Ext.Net.MVC.ModelFieldAttribute.Ignore
getset

◆ IgnoreRequiredDataAnnotation

virtual bool Ext.Net.MVC.ModelFieldAttribute.IgnoreRequiredDataAnnotation
getset

◆ IsComplex

virtual bool Ext.Net.MVC.ModelFieldAttribute.IsComplex
getset

True to render this property as complex object

◆ Mapping

virtual string Ext.Net.MVC.ModelFieldAttribute.Mapping
getset

A path expression for use by the Ext.data.reader.Reader implementation that is creating the Model to extract the Field value from the data object. If the path expression is the same as the field name, the mapping may be omitted.

◆ Name

virtual string Ext.Net.MVC.ModelFieldAttribute.Name
getset

The name by which the field is referenced within the Model. This is referenced by, for example, the dataIndex property in column definition objects passed to Ext.grid.header.Container. Note: In the simplest case, if no properties other than name are required, a field definition may consist of just a String for the field name.

◆ NullConvert

virtual bool Ext.Net.MVC.ModelFieldAttribute.NullConvert
getset

If you ensure that data comes with correct format then convert can be set to null, it increase a parsing performance

◆ Persist

virtual bool Ext.Net.MVC.ModelFieldAttribute.Persist
getset

False to exclude this field from the Ext.data.Model.modified fields in a model. This will also exclude the field from being written using a Ext.data.writer.Writer. This option is useful when model fields are used to keep state on the client but do not need to be persisted to the server. Defaults to true.

◆ RenderMilliseconds

virtual bool Ext.Net.MVC.ModelFieldAttribute.RenderMilliseconds
getset

◆ SerializeHandler

virtual string Ext.Net.MVC.ModelFieldAttribute.SerializeHandler
getset

A function which converts the Model's value for this Field into a form which can be used by whatever Writer is being used to sync data with the server.

◆ ServerMapping

virtual string Ext.Net.MVC.ModelFieldAttribute.ServerMapping
getset

◆ SortDir

virtual SortDirection Ext.Net.MVC.ModelFieldAttribute.SortDir
getset

Initial direction to sort ("ASC" or "DESC"). Defaults to "ASC".

◆ SortType

virtual SortTypeMethod Ext.Net.MVC.ModelFieldAttribute.SortType
getset

A function which converts a Field's value to a comparable value in order to ensure correct sort ordering. Predefined functions are provided in Ext.data.SortTypes.

◆ SubmitEmptyValue

virtual EmptyValue Ext.Net.MVC.ModelFieldAttribute.SubmitEmptyValue
getset

Empty value representation during saving (default value as None)

◆ Type

virtual ModelFieldType Ext.Net.MVC.ModelFieldAttribute.Type
getset

(Optional) The data type for automatic conversion from received data to the stored value if convert has not been specified. This may be specified as a string value. Possible values are

◆ UseNull

virtual bool Ext.Net.MVC.ModelFieldAttribute.UseNull
getset

Use when converting received data into a Number type (either int or float). If the value cannot be parsed, null will be used if useNull is true, otherwise the value will be 0. Defaults to false.


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