Class ChangeEventArgs
Provides event arguments for the OnValueChange and Changed events.
Inheritance
Namespace: Syncfusion.Blazor.QueryBuilder
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChangeEventArgs : Object
Remarks
This class contains detailed information about changes to a rule, such as the new value, the rule's unique identifier, and whether the change can be canceled.
Constructors
ChangeEventArgs()
Declaration
public ChangeEventArgs()
Properties
Cancel
Gets or sets a value indicating whether to prevent the rule change from being applied.
Declaration
public bool Cancel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When this property is set to true
, the pending change to the rule will be discarded, and the component's state will remain unchanged.
IsNewRule
Gets or sets a value indicating whether the rule is newly inserted.
Declaration
public bool IsNewRule { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This helps distinguish between newly created rules and modifications to existing ones.
Name
Gets or sets the name of the event that triggered the change.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the name of the event. |
Remarks
This property helps identify the origin of the change, such as a field, operator, or value modification.
Not
Gets or sets a value indicating whether the rule's condition is negated (e.g., using a "NOT" operator).
Declaration
public bool Not { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
A negated rule inverts the logic of the condition, filtering for results that do not match the specified criteria.
RuleId
Gets or sets the unique identifier of the rule.
Declaration
public string RuleId { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the unique ID of the rule. |
Remarks
This ID can be used to reference and manage the rule programmatically.
SelectedField
Gets or sets the field that was selected in the rule.
Declaration
public string SelectedField { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the selected field. |
Remarks
This property holds the name or identifier of the data field to which the rule is applied.
SelectedIndex
Gets or sets the index of the selected rule.
Declaration
public Nullable<int> SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | An integer that represents the index of the rule within its group. |
Remarks
This property is useful for identifying the position of the rule in the query structure.
Type
Gets or sets the type of the rule, typically indicating whether it's a rule or a group.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string indicating the rule type. |
Remarks
This helps differentiate between individual conditions and nested groups of conditions.
Value
Gets or sets the value associated with the rule.
Declaration
public dynamic Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object | A dynamic object representing the rule's value. |
Remarks
The data type of the value depends on the field and operator selected for the rule.