I have a problem with the Rad inputmanager when using it to generate numeric textboxes.
If I use the inputmanager to create a numeric textbox and default the value to 0 and the wants to save that zero it simply disappears. I need the zero, because an empty textbox has another meaning than a 0.
Is there a setting or something else that I am missing.
Thank you in advance
Dennis
A simple example:
<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ProductManager.Pages.Products.WebForm1" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title>Untitled Page</title>
</
head>
<
body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<
/telerik:RadScriptManager>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<telerik:RadInputManager ID="RadInputManager1" runat="server">
<telerik:NumericTextBoxSetting MinValue="0" Type="Number" AllowRounding="true" DecimalDigits="0">
<TargetControls>
<telerik:TargetInput ControlID="TextBox1" />
</TargetControls>
</telerik:NumericTextBoxSetting>
</telerik:RadInputManager>
</div>
</form>
</
body>
</
html>
namespace
ProductManager.Pages.Products
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
TextBox1.Text = "0
";
}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text;
}
}
}