|
NodeNumeric node control
Saturday, 12 September 2009
NodeNumeric allows you to show and edit an integer or decimal numbers. It supports binding to all numeric types that can be converted to the 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);
|
|