Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
6 views

I have a RadNumericTextbox where the visible field is set to false. Depending on another variables value, the  RadNumericTextbox visible may change to true. This is not working. The field is in a panel.

I stepped through the code and the visible property will not change.

I even directly changed the value to true and the value remained false in the watch list.

 

Vasko
Telerik team
 answered on 11 Apr 2024
1 answer
24 views

I'm trying to center a RadNumericTextBox in a RadGrid column and it is not working. HEre's what my grid looks like:


        <telerik:RadGrid ID="rgGrid" runat="server" OnNeedDataSource="rgGrid_NeedDataSource" EnableAjaxSkinRendering="true"
            AutoGenerateColumns="False" CellSpacing="0" GridLines="None" MasterTableView-CommandItemDisplay="None" OnPreRender="rgGrid_PreRender" OnItemDataBound="rgGrid_ItemDataBound">
            <MasterTableView DataKeyNames="ProjectDataIndividualsBenefitedId" AllowFilteringByColumn="false" AllowSorting="false" AllowPaging="false" PageSize="1000">
                <Columns>
                    <telerik:GridBoundColumn DataField="Question" HeaderText="Question" UniqueName="Question">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn UniqueName="Target" HeaderText="Target" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <telerik:RadNumericTextBox ID="rntbTarget" runat="server" DataType="System.Int32" MinValue="0" NumberFormat-DecimalDigits="0" DbValue='<%# Eval("TargetBenefited") %>' Width="50" CssClass="form-control"></telerik:RadNumericTextBox>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
               </Columns>
          </MasterTableView>
     </telerik:RadGrid>

And what I'm getting is the following:

Any ideas?

Vasko
Telerik team
 answered on 12 Dec 2023
2 answers
59 views

 

I am using below code and want to restrict input so user can only Allow numeric value to 3-digits right of decimal point.

for ex:

123.00

123

12.45

1

 <telerik:RadNumericTextBox ID="txtFactor" runat="server" MaxLength="5"
                                                MinValue="0.00" NumberFormat-DecimalDigits="<%$ Resources:Common,decimalDigitsTwo%>"
                                                Width="60px">
                                                 <ClientEvents OnBlur="CurrentYear" />
                                            </telerik:RadNumericTextBox>

Vasko
Telerik team
 answered on 23 Oct 2023
0 answers
47 views

Good morning,

i have page where top consist of a form and bottom consist of grid data. Grid data has 4 types of record:

'S' -  saved record where when i click on the row in the grid top of the page is fill out and I may modify radnumerictextbox and set the max value of radnumerictexbox in code behind

'P' - pending record where when i click on the row in the grid top of the page is fill out and I cannot modify radnumerictextbox  however the requested hours which i get from SP into the grid  has to go to radnumericbox instead max value is going into box.

For example: from 'S' saved record i set max value to 100. After that when i click on ''P' record instead of going 200 hours(from SP) into radnumeric box it will show max value from 'S' saved record which is 100.

My question is: is there possibilty to initialize max value when i click on 'P' record to show me actually reguested hours instead of max value set manually from previous clicked even though requested hours is greater than max value. if not then what other option do i have?

Thanks so much for your help.

Vitaly.

     

Vitaly
Top achievements
Rank 1
Iron
Iron
 asked on 12 Jun 2023
1 answer
52 views

I'm upgrading Telerik UI for ASP.NET AJAX from a very old version, from 2013, to the latest. For the most part it has been plug & play except for RadNumericTextBox, which doesn't display the spin buttons correctly and doesn't show the validation icon correctly.

Here is a screenshot of old vs new:

This is the markup:


<table>
	<tr id="trPassExp" runat="server" class="lhqDetailLabel">
		<td colspan="2" align="right">Password expires every&nbsp;</td>
		<td colspan="2" style="text-align: left;">
			<telerik:RadNumericTextBox runat="server" 
				RenderMode="Lightweight"
				ShowSpinButtons="true" 
				NumberFormat-DecimalDigits="0" 
				Width="60px"
				EnableEmbeddedSkins="True" 
				Skin="Sunset" 
				MinValue="7" 
				MaxValue="90" id="txtPassExpires"></telerik:RadNumericTextBox>&nbsp;days&nbsp;&nbsp;
		</td>
	</tr>
	<tr id="trPassLen" runat="server" class="lhqDetailLabel">
		<td colspan="2" align="right">Password must be at least&nbsp;</td>
		<td colspan="2" style="text-align: left;">
			<telerik:RadNumericTextBox runat="server" 
			   RenderMode="Lightweight" 
			   ShowSpinButtons="true" 
			   NumberFormat-DecimalDigits="0" 
			   Width="60px" 
			   EnableEmbeddedSkins="True" 
			   Skin="Sunset" 
			   MinValue="8" 
			   MaxValue="35" id="txtPassMin"></telerik:RadNumericTextBox>&nbsp;characters&nbsp;&nbsp;
		</td>
	</tr>
	 <tr id="trPassNumeric" runat="server" class="lhqDetailLabel">
		<td colspan="2" align="right">Password must contain at least&nbsp;</td>
		<td colspan="2" style="text-align: left;">
			<telerik:RadNumericTextBox runat="server" 
			   RenderMode="Lightweight" 
			   ShowSpinButtons="true" 
			   NumberFormat-DecimalDigits="0" 
			   Width="60px" 
			   EnableEmbeddedSkins="True" 
			   Skin="Sunset" 
			   MinValue="1" 
			   MaxValue="8" id="txtNumeric"></telerik:RadNumericTextBox>&nbsp;numbers&nbsp;&nbsp;
		</td>
	</tr>
	<tr id="trShutDown" runat="server" class="lhqDetailLabel">
		<td colspan="2" align="right">Disable user account after&nbsp;</td>
		<td colspan="2" style="text-align: left;">
			<telerik:RadNumericTextBox runat="server" 
			   RenderMode="Lightweight" 
			   ShowSpinButtons="true" 
			   NumberFormat-DecimalDigits="0" 
			   Width="60px" 
			   EnableEmbeddedSkins="True" 
			   Skin="Sunset" 
			   MinValue="3" 
			   MaxValue="6" id="txtLoginTrys"></telerik:RadNumericTextBox>&nbsp;unsuccessful login attempts&nbsp;&nbsp;
		</td>
	</tr>
</table>

Any ideas?
Rumen
Telerik team
 answered on 27 Jul 2022
1 answer
125 views

The RadNumericTextBox is rounding incorrectly after a postback.

I am currently using 5 decimal places with the value of

0.00481487920209807

When the page loads it displays correctly

After I click the Postback button the display value changes

<div class="form-row">
            <asp:Button ID="btnCausePostback" Text="Postback" runat="server" OnClick="btnCausePostback_Click" />
            <telerik:RadNumericTextBox runat="server" ID="txtUnitCost" NumberFormat-DecimalDigits="5" Value="0.00481487920209807" />​
        </div>


protected void btnCausePostback_Click(object sender, EventArgs e)
        {

        }

 

I am not sure what the round function is doing in this scenario?

I do have a work around which is setting

NumberFormat-AllowRounding="false"
And doing my own rounding using Math.Round to set the value properly.

Currently using Q2 2021 Telerik version
Vessy
Telerik team
 answered on 24 Nov 2021
0 answers
61 views
not taking negative values
Kurt
Top achievements
Rank 2
 asked on 20 Nov 2021
2 answers
89 views

I've found a bug, it's strange but it's working if i remove a parameter.

I'm french and i've got an application made since year and use Telerik 2017.3 (same in recent) the problem was found by a user who use "point" in numeric pad.

I know this problem was resolved since years, and other website in my society. but i've searched why is again present. and make sample to find difference and remove parameter by parameter of RadNumericTextbox to find who blocked :

Originale code

<telerik:RadNumericTextBox ID="rntbMontantMensuel" runat="server" Enabled="true" IncrementSettings-InterceptArrowKeys="False" IncrementSettings-InterceptMouseWheel="False" DataType="Currency" ShowSpinButtons="false" MinValue="0" NumberFormat-DecimalDigits="2" RenderMode="Auto" EnabledStyle-Width="220px" EmptyMessage="0 " EnabledStyle-HorizontalAlign="right" FocusedStyle-HorizontalAlign="right" ReadOnlyStyle-HorizontalAlign="Center" HoveredStyle-HorizontalAlign="right" Type="Currency" AutoPostBack="true" ClientEvents-OnFocus="disableValide" ClientEvents-OnBlur="enableValide" NumberFormat-KeepNotRoundedValue="True"></telerik:RadNumericTextBox>

Code worked :

<telerik:RadNumericTextBox ID="rntbMontantMensuel" runat="server" Enabled="true"  IncrementSettings-InterceptMouseWheel="False" DataType="Currency" ShowSpinButtons="false" MinValue="0" NumberFormat-DecimalDigits="2" RenderMode="Auto" EnabledStyle-Width="220px" EmptyMessage="0 " EnabledStyle-HorizontalAlign="right" FocusedStyle-HorizontalAlign="right" ReadOnlyStyle-HorizontalAlign="Center" HoveredStyle-HorizontalAlign="right" Type="Currency" AutoPostBack="true" ClientEvents-OnFocus="disableValide" ClientEvents-OnBlur="enableValide" NumberFormat-KeepNotRoundedValue="True"></telerik:RadNumericTextBox>

Yes if i've IncrementSettings-InterceptArrowKeys="False"

when user press "." in numeric pad, i've got an icon "block" (red cross inside circle) and don't change my point to coma (French decimal separator)

 

Vincent
Top achievements
Rank 1
Iron
Iron
 answered on 16 Jul 2021
0 answers
84 views

Hi there, 

I´m using a RadNumericTextBox as a counter and I would like to show the number on the right but no between the arrows.

Right now I´m using the option:  <EnabledStyle HorizontalAlign="Right" />

Thanks,

Alvaro.

dds
Top achievements
Rank 1
Iron
Iron
 asked on 15 Jun 2021
3 answers
57 views

When I use numerictextbox demos and I try to enter letters, the objects rejects input, but when I use them in my project, the textbox allows user to enter letter and once it loses the focus it gets empty.

My Code

 

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.Master" CodeBehind="Default.aspx.vb" Inherits="GadsWebApp._Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        body {
            background-image: url('images/BackGrounds/default5.jpg');
            background-repeat: no-repeat; background-size: 100%; background-color: transparent;width: 100%;
            height: 100%; margin: 0px; position: absolute; top: 0px; right: 0px; bottom: 0px; left: 0px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
     <telerik:RadNumericTextBox RenderMode="Lightweight" runat="server" ID="RadNumericTextBox1" Width="190px" Value="15"
            EmptyMessage="Enter amount" Type="Currency" MinValue="0" MaxValue="100"></telerik:RadNumericTextBox>
 
</asp:Content>

 

Vessy
Telerik team
 answered on 09 Feb 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?