Skip to content

NodeNumeric

NodeNumeric allows displaying and editing integer or decimal numbers. It supports binding to all numeric types that can be converted to System.Decimal type.

Example

// Custom node class with the Salary member to which the node control will be bound.
class NodeEx : Node
{
   public decimal Salary;
}

NodeTextBox name = new NodeTextBox();
name.AttachTo(tree);

NodeNumeric num = new NodeNumeric();
// Bind the node control to the Salary node member.
num.DataFieldName = "Salary";
num.Editable = true;
num.DecimalPlaces = 4;
num.AttachTo(tree);

// Add node.
NodeEx node = new NodeEx();
node.Text = "John Smith";
node.Salary = 13000.1234M;
node.AttachTo(tree);
' Custom node class with the Salary member to which the node control will be bound.
Class NodeEx
    Inherits Node
    Public Salary As Decimal
End Class

Dim name As New NodeTextBox()
name.AttachTo(tree)

Dim num As New NodeNumeric()
' Bind the node control to the Salary node member.
num.DataFieldName = "Salary"
num.Editable = True
num.DecimalPlaces = 4
num.AttachTo(tree)

' Add node.
Dim node As New NodeEx()
node.Text = "John Smith"
node.Salary = 13000.1234D
node.AttachTo(tree)

Additional API reference#

Properties#

  • DecimalPlaces - defines the number of decimal places to display.
  • StaticValue - allows showing some static content without binding node control to a node.
  • Increment - defines the value to increment or decrement the editor value when the up or down keys are pressed.
  • Minimum - defines the minimum allowed value when editing.
  • Maximum - defines the maximum allowed value when editing.