Class ExpressionFieldDescriptor
ExpressionFieldDescriptor is a FieldDescriptor with support for run-time formula expressions.
Expression fields are managed by the ExpressionFieldDescriptorCollection that is returned by the ExpressionFields property of a TableDescriptor.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Grouping
Assembly: Syncfusion.Grouping.Base.dll
Syntax
public class ExpressionFieldDescriptor : FieldDescriptor, ICustomTypeDescriptor, IDisposable, ICloneable, IStandardValuesProvider
Constructors
ExpressionFieldDescriptor()
Initializes a new empty instance for ExpressionFieldDescriptor expression field.
Declaration
public ExpressionFieldDescriptor()
ExpressionFieldDescriptor(String)
Initializes a new empty instance for ExpressionFieldDescriptor expression field.
Declaration
public ExpressionFieldDescriptor(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field. |
ExpressionFieldDescriptor(String, String)
Initializes a new empty instance for ExpressionFieldDescriptor expression field with a name and expression.
Declaration
public ExpressionFieldDescriptor(string name, string expression)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field. |
System.String | expression | The expression. See the Grid User's Guide for expression syntax and examples. |
ExpressionFieldDescriptor(String, String, String)
Initializes a new empty instance for ExpressionFieldDescriptor expression field a name, expression, and result type.
Declaration
public ExpressionFieldDescriptor(string name, string expression, string resultType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field. |
System.String | expression | The expression. See the Grid User's Guide for expression syntax and examples. |
System.String | resultType | The result type. |
ExpressionFieldDescriptor(String, String, Type)
Initializes a new empty instance for ExpressionFieldDescriptor expression field with a name, expression, and result type.
Declaration
public ExpressionFieldDescriptor(string name, string expression, Type resultType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the field. |
System.String | expression | The expression. See the Grid User's Guide for expression syntax and examples. |
System.Type | resultType | The result type. |
Properties
DefaultValue
Not used for expression fields.
Declaration
public string DefaultValue { get; set; }
Property Value
Type |
---|
System.String |
Expression
Gets or sets the formula expression. See the Grid user's guide for syntax and examples.
Declaration
public string Expression { get; set; }
Property Value
Type |
---|
System.String |
MappingName
Not used for expression fields.
Declaration
public string MappingName { get; set; }
Property Value
Type |
---|
System.String |
ReadOnly
Gets or sets the ReadOnly for expression fields.
Declaration
public override bool ReadOnly { get; set; }
Property Value
Type |
---|
System.Boolean |
Overrides
ResultType
The result type that the expression should be converted to (default is System.String).
Declaration
public string ResultType { get; set; }
Property Value
Type |
---|
System.String |
Methods
Clone()
Creates a copy of this descriptor.
Declaration
public override FieldDescriptor Clone()
Returns
Type | Description |
---|---|
FieldDescriptor | Copy of this descriptor. |
Overrides
CopyExpressionFieldMembersTo(ExpressionFieldDescriptor)
Used to copy the expression fields
Declaration
protected void CopyExpressionFieldMembersTo(ExpressionFieldDescriptor ed)
Parameters
Type | Name | Description |
---|---|---|
ExpressionFieldDescriptor | ed | ExpressionFieldDescriptor |
DetermineReferencedFields()
Returns an array of field descriptor names that the expression references.
Declaration
protected override string DetermineReferencedFields()
Returns
Type | Description |
---|---|
System.String | Returns array of field descriptor names. |
Overrides
Equals(Object)
Compares this descriptor with another descriptor.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean | True if both the descriptors are equivalent; False otherwise. |
Overrides
GetCompiledExpression()
Gets a string that holds pre-compiled information about the expression.
Declaration
public string GetCompiledExpression()
Returns
Type | Description |
---|---|
System.String | A string that holds pre-compiled information about the expression. |
GetHashCode()
Serves as a hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Returns the hash code. |
Overrides
GetPropertyType()
Gets the property type.
Declaration
public override Type GetPropertyType()
Returns
Type | Description |
---|---|
System.Type | Property type. |
Overrides
GetValue(Record)
Calculates the expression result value for the specified record.
Declaration
public override object GetValue(Record record)
Parameters
Type | Name | Description |
---|---|---|
Record | record | The Record. |
Returns
Type | Description |
---|---|
System.Object | The Value of the record. |
Overrides
InitializeFrom(FieldDescriptor)
Creates a new expression field descriptor from another descriptor.
Declaration
public override void InitializeFrom(FieldDescriptor other)
Parameters
Type | Name | Description |
---|---|---|
FieldDescriptor | other | Field descriptor which is used to create the new descriptor. |
Overrides
ResetCompiledExpression()
Resets the compiled expression. It will be recompiled later on demand.
Declaration
public void ResetCompiledExpression()
ResetExpression()
Resets the formula expression to empty.
Declaration
public void ResetExpression()
ResetResultType()
Resets the result type to System.String.
Declaration
public void ResetResultType()
ShouldSerializeResultType()
Determines if ResultType was modified.
Declaration
public bool ShouldSerializeResultType()
Returns
Type | Description |
---|---|
System.Boolean | True if the content was modified; False otherwise. |