Hi,
first of all, this is how I implemented the NumericTextBox, bound to an integer:
My problem is:
As soon as I bind something against the NumericTextBox (when I use NumericTextBoxFor(...)), the value is never empty. It looks empty but as soon as the user clicks inside the TextBox the value of the bound integer (int.MinValue or whatever value the property has) is shown. First of all - the value (int.MinValue) makes no sense because the Min-property is set to 1. Secondly, why is there anything? The NumericTextBox should be empty, because I didn't set a value.
This problem causes, that the user has to delete the value first before he is able to insert something. On initialisation of the NumericTextBox it should be empty - but it should also be bound to a property.
Is there any workaround or solution for this problem? Hope someone can help me.
first of all, this is how I implemented the NumericTextBox, bound to an integer:
@(Html.Kendo().NumericTextBoxFor(m => m.Number)
.Name("ntb")
.Format("n0")
.Min(1)
.Max(50)
)
My problem is:
As soon as I bind something against the NumericTextBox (when I use NumericTextBoxFor(...)), the value is never empty. It looks empty but as soon as the user clicks inside the TextBox the value of the bound integer (int.MinValue or whatever value the property has) is shown. First of all - the value (int.MinValue) makes no sense because the Min-property is set to 1. Secondly, why is there anything? The NumericTextBox should be empty, because I didn't set a value.
This problem causes, that the user has to delete the value first before he is able to insert something. On initialisation of the NumericTextBox it should be empty - but it should also be bound to a property.
Is there any workaround or solution for this problem? Hope someone can help me.