Back to Devexpress

SpinEdit.EditValue Property

windowsforms-devexpress-dot-xtraeditors-dot-spinedit-027487ae.md

latest7.3 KB
Original Source

SpinEdit.EditValue Property

Gets or sets the editor’s value.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public override object EditValue { get; set; }
vb
<Browsable(False)>
Public Overrides Property EditValue As Object

Property Value

TypeDescription
Object

An object representing the editor’s value.

|

Remarks

The EditValue property contains the value edited by a spin edit control. If you need to obtain the edit value’s equivalent decimal representation, use the SpinEdit.Value property.

Changing the EditValue property value at runtime raises the RepositoryItem.EditValueChanging event.

The following code snippets (auto-collected from DevExpress Examples) contain references to the EditValue 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.

reporting-winforms-label-report-in-code/CS/Reporting_how-to-create-a-label-report-at-runtime-t473792/Form1.cs#L25

csharp
XtraReport labelReport = builder.GenerateLabelReport(
    Convert.ToSingle(LabelWidthSpinEdit.EditValue),
    Convert.ToSingle(LabelHeightSpinEdit.EditValue),

winforms-memo-editor-advanced-mode/CS/MemoEditSample/Views/DemoView.cs#L32

csharp
fluent.SetBinding(seLinesCount, se => se.EditValue, x => x.CustomLinesCount);
fluent.SetBinding(seLineLength, se => se.EditValue, x => x.LineLength);

winforms-create-a-custom-exporter-for-pivotgridcontrol-with-xtrareport/CS/Report_at_Runtime/Form1.cs#L21

csharp
private void button1_Click(object sender, EventArgs e) {
    XtraReport rep = PivotReportGenerator.GenerateReport(pivotGridControl1, ((ReportGeneratorType)radioGroup1.EditValue), Convert.ToInt32(spinEdit1.EditValue), checkEdit2.Checked);
    rep.ShowPreviewDialog();

winforms-buttonedit-customize-button-paddings/CS/ButtonEditWithPadding/Form1.cs#L74

csharp
{
    Padding buttonPadding = new Padding(Convert.ToInt32(((SpinEdit)sender).EditValue));
    paddingButtonEdit1.Properties.Padding = buttonPadding;

winforms-grid-toggle-row-visibility/CS/WindowsApplication1/Form1.cs#L45

csharp
EditorButton button = spinEdit1.Properties.Buttons[1];
button.Enabled = !(spinEdit1.EditValue == null);
button.Caption = rowVisibilityHelper1.IsRowInvisible(GetButtonEditValue()) ? "Show" : "Hide";

reporting-winforms-label-report-in-code/VB/Reporting_how-to-create-a-label-report-at-runtime-t473792/Form1.vb#L26

vb
Dim builder As New CustomLabelReportBuilder()
Dim labelReport As XtraReport = builder.GenerateLabelReport(Convert.ToSingle(LabelWidthSpinEdit.EditValue), Convert.ToSingle(LabelHeightSpinEdit.EditValue), Convert.ToSingle(VerticalPitchSpinEdit.EditValue), Convert.ToSingle(HorizontalPitchSpinEdit.EditValue), DirectCast(UnitComboBox.EditValue, DevExpress.Drawing.DXGraphicsUnit), Convert.ToSingle(BottomMarginSpinEdit.EditValue), Convert.ToSingle(TopMarginSpinEdit.EditValue), Convert.ToSingle(LeftMarginSpinEdit.EditValue), Convert.ToSingle(RightMarginSpinEdit.EditValue), Convert.ToInt32(lookUpPaperType.EditValue))
Return labelReport

winforms-memo-editor-advanced-mode/VB/MemoEditSample/Views/DemoView.vb#L35

vb
fluent.SetBinding(seLinesCount, Function(se) se.EditValue, Function(x) x.CustomLinesCount)
fluent.SetBinding(seLineLength, Function(se) se.EditValue, Function(x) x.LineLength)

winforms-create-a-custom-exporter-for-pivotgridcontrol-with-xtrareport/VB/Report_at_Runtime/Form1.vb#L22

vb
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
    Dim rep As XtraReport = GenerateReport(pivotGridControl1, CType(radioGroup1.EditValue, ReportGeneratorType), Convert.ToInt32(spinEdit1.EditValue), checkEdit2.Checked)
    rep.ShowPreviewDialog()

winforms-buttonedit-customize-button-paddings/VB/ButtonEditWithPadding/Form1.vb#L70

vb
Private Sub spinEdit1_EditValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles spinEdit1.EditValueChanged
    Dim buttonPadding As New Padding(Convert.ToInt32(DirectCast(sender, SpinEdit).EditValue))
    paddingButtonEdit1.Properties.Padding = buttonPadding

winforms-grid-toggle-row-visibility/VB/WindowsApplication1/Form1.vb#L42

vb
Dim button As EditorButton = spinEdit1.Properties.Buttons(1)
button.Enabled = Not(spinEdit1.EditValue Is Nothing)
If rowVisibilityHelper1.IsRowInvisible(GetButtonEditValue()) Then

See Also

Value

Text

SpinEdit Class

SpinEdit Members

DevExpress.XtraEditors Namespace