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

Hi,

We are getting the below error in radG and telRad calender etc.. properties are not working properly in visual studio 2019 4.5 .Net Framework and Telerik.Web.UI 2009.1.402.20 dll is used, when I click any link in grid then just loading not giving result, can anyone please help?

http://localhost:63648/WebResource.axd?d=voFyyN8dvBwW_B2Y7FVU-0v-b8hCvMFUuGTx5hVDM1rqxAp8wKgXAToLnmNbdlnxHBOLUkaqq_U_0pO0VsUG_T9IfSlUf_r5ftxqNxAthfXE57hZKdbPO85ezSDbr-LVBJ3Hg7mSvgJ8LozjsG3Ou4TJxZZrJc_U7ARWEn03vti-x_XufTEaKLkSIM7ML4ny0&t=638687597346095926

Uncaught Error: Unexpected ajax response was received from the server.
This may be caused by one of the following reasons:

 - Server.Transfer.
 - Custom http handler.
- Incorrect loading of an "Ajaxified" user control.

Verify that you don't get a server-side exception or any other undesired behavior, by setting the EnableAJAX property to false.
    at _1.CheckContentType (WebResource.axd?d=voFyyN8dvBwW_B2Y7FVU-0v-b8hCvMFUuGTx5hVDM1rqxAp8wKgXAToLnmNbdlnxHBOLUkaqq_U_0pO0VsUG_T9IfSlUf_r5ftxqNxAthfXE57hZKdbPO85ezSDbr-LVBJ3Hg7mSvgJ8LozjsG3Ou4TJxZZrJc_U7ARWEn03vti-x_XufTEaKLkSIM7ML4ny0&t=638687597346095926:1521:7)
    at _1.HandleAsyncRequestResponse (WebResource.axd?d=voFyyN8dvBwW_B2Y7FVU-0v-b8hCvMFUuGTx5hVDM1rqxAp8wKgXAToLnmNbdlnxHBOLUkaqq_U_0pO0VsUG_T9IfSlUf_r5ftxqNxAthfXE57hZKdbPO85ezSDbr-LVBJ3Hg7mSvgJ8LozjsG3Ou4TJxZZrJc_U7ARWEn03vti-x_XufTEaKLkSIM7ML4ny0&t=638687597346095926:1316:8)
    at _49.onreadystatechange (WebResource.axd?d=voFyyN8dvBwW_B2Y7FVU-0v-b8hCvMFUuGTx5hVDM1rqxAp8wKgXAToLnmNbdlnxHBOLUkaqq_U_0pO0VsUG_T9IfSlUf_r5ftxqNxAthfXE57hZKdbPO85ezSDbr-LVBJ3Hg7mSvgJ8LozjsG3Ou4TJxZZrJc_U7ARWEn03vti-x_XufTEaKLkSIM7ML4ny0&t=638687597346095926:404:4)
Vasko
Telerik team
 answered on 14 Feb 2025
2 answers
80 views
Hi, I'm using in asp.net a NumericTextBox control, with a lower and upper limit value, but I don't know how to set that only integers are displayed, it seems that the limits and the maximum number of digits equal to 4 allow to limit the damage inserting years, but the '.' is displayed to separate the thousands

How do I avoid it? Thank you
<telerik:RadNumericTextBox runat="server" ID="txtFirstYear" RenderMode="Lightweight" MaxLength="4" MaxValue="2030" Visible="true" EmptyMessage="" MinValue="1998" CausesValidation="True" Culture="it-IT" DataType="System.Int32">
    <NumberFormat DecimalDigits="0"  />
</telerik:RadNumericTextBox>

Andrew
Top achievements
Rank 2
Iron
 answered on 28 Jan 2025
1 answer
62 views

Good afternoon,

I'm using a RadGrid with Batch Editing.  The grid is populated using OnNeedDataSource.

<telerik:RadGrid ID="RadGridEntries" runat="server" RenderMode="Lightweight" AllowSorting="True" CellSpacing="-1" GridLines="Horizontal"
    OnNeedDataSource="RadGridEntries_NeedDataSource" AllowAutomaticUpdates="false"
    AllowAutomaticInserts="false" AllowAutomaticDeletes="false" OnBatchEditCommand="RadGridEntries_BatchEditCommand"
    OnPreRender="RadGridEntries_PreRender">
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
    </ClientSettings>
    <MasterTableView Name="Authorities" AutoGenerateColumns="false" DataKeyNames="Index_id"
        CommandItemDisplay="Top" EditMode="Batch" BatchEditingSettings-OpenEditingEvent="DblClick" HeaderStyle-HorizontalAlign="Center">
        <CommandItemSettings ShowRefreshButton="false" />
        <BatchEditingSettings EditType="Row" HighlightDeletedRows="true" />
        <Columns>
            <telerik:GridBoundColumn DataField="Index_id" UniqueName="Index_id" ReadOnly="true" Visible="false" Exportable="false" />
            <telerik:GridBoundColumn DataField="Authority" SortExpression="Authority" UniqueName="Authority"
                HeaderText="Authority" MaxLength="2">
				<ColumnValidationSettings EnableRequiredFieldValidation="true">
					<RequiredFieldValidator ForeColor="Red" Text="*Authority is required" Display="Dynamic">
					</RequiredFieldValidator>
				</ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Short_description" SortExpression="Short_description" UniqueName="Short_description"
                MaxLength="30" HeaderText="Short Description" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="150px">
				<ColumnValidationSettings EnableRequiredFieldValidation="true">
					<RequiredFieldValidator ForeColor="Red" Text="*Short Description is required" Display="Dynamic">
					</RequiredFieldValidator>
				</ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Long_description" SortExpression="Long_description" UniqueName="Long_description"
                MaxLength="100" HeaderText="Long Description" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="200px" />
            <telerik:GridTemplateColumn DataField="Percentage" SortExpression="Percentage" UniqueName="Percentage" HeaderText="Percentage">
                <ItemTemplate>
                    <%#DataBinder.Eval(Container.DataItem, "Percentage","{0} %")%>
                </ItemTemplate>
                <EditItemTemplate>
                    <span>
                        <telerik:RadNumericTextBox RenderMode="Lightweight" Width="75px" runat="server" ID="txtPercentage"
                            MaxValue="100" MinValue="-100">
                            <NumberFormat DecimalDigits="3" NegativePattern="-n %" PositivePattern="n %" />
                        </telerik:RadNumericTextBox>
                        <span style="color: Red">
                            <asp:RequiredFieldValidator ID="rvPercentage"
                                ControlToValidate="txtPercentage" ErrorMessage="*Percentage is required" runat="server" Display="Dynamic">
                            </asp:RequiredFieldValidator>
                        </span>
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridCheckBoxColumn DataField="IsPriceList" DataType="System.Boolean" SortExpression="IsPriceList"
                StringFalseValue="0" StringTrueValue="1" HeaderText="Price List" />
            <telerik:GridBoundColumn DataField="Date_amended" SortExpression="Date_amended" HeaderText="Date Amended" ReadOnly="true" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

In RadGridEntries_BatchEditCommand I'm capturing the old and new values:

Hashtable newValues = command.NewValues;
Hashtable oldValues = command.OldValues;

But the Percentage template column is missing from OldValues:

The Percentage column is stored as a decimal(6,3).  I'm trying to display the value with the 3 d.p and a % sign.  It's not stored as a percentage i.e. if the value is stored as 10.505 then it is displayed as 10.505 - I'm not storing it divided by 100.

I'm using the Command Item buttons to Save and Insert.

What can I do to make sure that the Percentage Old Value is stored so that I can compare it to the New Value?

Kind regards,

Richard

Richard
Top achievements
Rank 4
Iron
Iron
Iron
 answered on 29 Nov 2024
1 answer
92 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
72 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
309 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
119 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
97 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
223 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
106 views
not taking negative values
Kurt
Top achievements
Rank 2
 asked on 20 Nov 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?