Back to Devexpress

SpinEdit.Value Property

windowsforms-devexpress-dot-xtraeditors-dot-spinedit-04dc06a1.md

latest6.6 KB
Original Source

SpinEdit.Value Property

Gets or sets a spin editor’s value.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Property Value

TypeDefaultDescription
Decimal0

A decimal value representing the editor’s value.

|

Remarks

The Value property is nothing but a decimal representation of the SpinEdit.EditValue property value. Use it when you need to obtain the editor’s edit value in decimal format.

Assigning this property a new value raises the RepositoryItem.EditValueChanging event.

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-dashboard-custom-items-extension/CS/CustomItemExtension/CustomItems/Heatmap/HeatmapOptionsControl.cs#L91

csharp
colorEdit2.Color = userColor2;
percentLevelsEdit.Value = Convert.ToDecimal(percentMarksCount);
absoluteLevelsEdit.Value = Convert.ToDecimal(absoluteMarksCount);

winforms-pictureedit-add-custom-graphic-operation-watermark/CS/WatermarkDemo/WatermarkDemo/WatermarkToolControl.cs#L29

csharp
cpeColor.Color = Color.FromArgb(180, Color.Silver);
seFontSize.Value = 30;
ceRepeat.Checked = true;

winforms-grid-customize-cell-color/CS/Form1.cs#L37

csharp
{
    _CellColorHelper.SetCellColor(Convert.ToInt32(spinEdit1.Value), gridView1.Columns[Convert.ToInt32(spinEdit2.Value)], colorEdit1.Color);
}

XPO_how-to-generate-a-sequential-number-for-a-business-object-within-a-database-transaction-e2620/CS/ExplicitUnitOfWorkDemo/frmMain.cs#L103

csharp
private void UpdateRows() {
    xpView1.TopReturnedRecords = (int)spinEdit1.Value;
    xpView1.Reload();

winforms-treelist-show-checkboxes-for-specific-level/CS/WindowsApplication1/Form1.cs#L39

csharp
{
    hideCheckBoxHelper.Level = Convert.ToInt16(spinEdit1.Value);
}

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/Heatmap/HeatmapOptionsControl.vb#L100

vb
colorEdit2.Color = userColor2
percentLevelsEdit.Value = Convert.ToDecimal(percentMarksCount)
absoluteLevelsEdit.Value = Convert.ToDecimal(absoluteMarksCount)

winforms-pictureedit-add-custom-graphic-operation-watermark/VB/WatermarkDemo/WatermarkDemo/WatermarkToolControl.vb#L32

vb
cpeColor.Color = Color.FromArgb(180, Color.Silver)
seFontSize.Value = 30
ceRepeat.Checked = True

XPO_how-to-generate-a-sequential-number-for-a-business-object-within-a-database-transaction-e2620/VB/ExplicitUnitOfWorkDemo/frmMain.vb#L108

vb
Private Sub UpdateRows()
    xpView1.TopReturnedRecords = CInt(Math.Truncate(spinEdit1.Value))
    xpView1.Reload()

winforms-grid-customize-cell-color/VB/Form1.vb#L34

vb
Private Sub simpleButton1_Click(ByVal sender As Object, ByVal e As EventArgs)
    _CellColorHelper.SetCellColor(Convert.ToInt32(spinEdit1.Value), gridView1.Columns(Convert.ToInt32(spinEdit2.Value)), colorEdit1.Color)
End Sub

winforms-treelist-show-checkboxes-for-specific-level/VB/WindowsApplication1/Form1.vb#L38

vb
Private Sub spinEdit1_EditValueChanged(ByVal sender As Object, ByVal e As EventArgs)
    hideCheckBoxHelper.Level = Convert.ToInt16(spinEdit1.Value)
End Sub

See Also

EditValue

EditValueChanging

SpinEdit Class

SpinEdit Members

DevExpress.XtraEditors Namespace