Back to Devexpress

CalcEdit.Value Property

windowsforms-devexpress-dot-xtraeditors-dot-calcedit-778e508f.md

latest3.8 KB
Original Source

CalcEdit.Value Property

Gets or sets the editor’s decimal value.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Appearance")]
[Bindable(false)]
public virtual decimal Value { get; set; }
vb
<DXCategory("Appearance")>
<Bindable(False)>
Public Overridable Property Value As Decimal

Property Value

TypeDescription
Decimal

The editor’s decimal value.

|

Remarks

The Value property matches the value of the CalcEdit.EditValue property. It returns the result of the conversion of the edit value to decimal. If the conversion fails, the Value property returns 0.

Assigning Value actually changes the edit value.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Value property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-scheduler-create-appointment-edit-form-with-custom-fields/CS/SimpleCustomFields/MyAppointmentForm.cs#L37

csharp
protected void UpdateCustomFieldEditors() {
    calcAmount.Value = ((MyAppointmentFormController)base.Controller).Amount;
    tbContact.Text = ((MyAppointmentFormController)base.Controller).ContactInfo;

winforms-scheduler-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Forms/MyAppointmentEditForm.cs#L101

csharp
controller.CustomPrice = calcPrice.Value;

winforms-scheduler-create-appointment-edit-form-with-custom-fields/VB/SimpleCustomFields/MyAppointmentForm.vb#L39

vb
Protected Sub UpdateCustomFieldEditors()
    calcAmount.Value = CType(MyBase.Controller, MyAppointmentFormController).Amount
    tbContact.Text = CType(MyBase.Controller, MyAppointmentFormController).ContactInfo

winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Forms/MyAppointmentEditForm.vb#L114

vb
controller.CustomPrice = calcPrice.Value

See Also

EditValue

CalcEdit Class

CalcEdit Members

DevExpress.XtraEditors Namespace