This is a migrated thread and some comments may be shown as answers.

Zero values in textboxes with radinputmanager

6 Answers 133 Views
Input
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 23 Feb 2009, 04:23 PM
Hi

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;

}

}

}

 

 

 

6 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Feb 2009, 10:41 AM
Hi Dennis,

See the forum link which discusses similar scenario about RadInputManager.

Thanks,
Princy.
0
Princy
Top achievements
Rank 2
answered on 24 Feb 2009, 10:44 AM
 
0
Dennis
Top achievements
Rank 1
answered on 24 Feb 2009, 10:54 AM
Hi Princy

First of all, thanks for your reply :)

For some it might be a solution, but on one of my aspx pages I would need 25 hidden fields, and on another where there are approx. 1000 numerictextboxes in a grid I would need 1000 hidden textboxes :) and therefore I can not see this as a solution.

I have to say, that not being able to enter a zero in a field, must be a bug.

I have made a support ticket, so I hope, that Telerik can helpt with a usable solution.

Dennis
0
Dennis
Top achievements
Rank 1
answered on 26 Feb 2009, 07:40 AM
Hi

I asked Telerik Support and got the following answer, hope it can help others:
Indeed, this issue is present in this version of the control. It is considered as a potential bug, and has been escalated to our developers, and I hope they will address it soon. In the meantime, you can consider using the "EmptyMessage" setting, a possible means to alleviate the issue.
0
PJ
Top achievements
Rank 1
answered on 04 Mar 2009, 06:55 PM
Any word on whether this bug is addressed in the Q1 2009 release?
0
Yavor
Telerik team
answered on 05 Mar 2009, 06:49 AM
Hi PJ,

While I cannot commit to a definite timeframe, we will do our best to address the issue soon. Most probably it will be for one of the service packs, subsequent to q1.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Input
Asked by
Dennis
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Dennis
Top achievements
Rank 1
PJ
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or