<label for="poNumTextbox" style="color:white; line-height:3.2; padding-right:5px; padding-top:5px">PO#</label>
<div class="k-textbox" style="width:120px">
@(Html.Kendo().NumericTextBox<int>()
.Name("poNumTextbox")
.Format("#")
.Decimals(0)
.RestrictDecimals(true)
.Placeholder("PO #")
.HtmlAttributes(new { style = "font-size:inherit; width: 100%" })
.Spinners(false)
)
</div>
I am trying to figure out how to keep leading zeros. Numbers can be something like "00045678" with max 8 chars. However when you click out of the textbox, it is converted to "45678" I'm using numeric textbox to prevent entry of non-numeric characters. Also no decimals or special characters - numbers only.
Thank you.
edit: nevermind, found that MaskedTextbox gives me what I need without having to misuse NumericTextbox