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

[Solved] NumericBox Does Not Render Correctly

5 Answers 144 Views
NumericBox for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
John DeVight
Top achievements
Rank 1
John DeVight asked on 12 Jul 2012, 12:00 PM
I have a DropDownList and a NumericBox on a page.  The DropDownList is fine, but the NumericBox does not render properly on the page.  Here is the html:



<input id="taskEstimatedHours"

data-win-control="Telerik.UI.RadNumericBox"

data-win-options='{ format: "n0", min: 0, max: 100 }' />

 

What am I missing?



Attached is a screenshot of what I get.



Below is the html for the entire page:



<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title>splitPage</title>

<!-- WinJS references -->

<link href="//Microsoft.WinJS.1.0.RC/css/ui-dark.css" rel="stylesheet" />

<script src="//Microsoft.WinJS.1.0.RC/js/base.js"></script>

<script src="//Microsoft.WinJS.1.0.RC/js/ui.js"></script>

<!-- Telerik references -->

<link rel="stylesheet" type="text/css" href="/Telerik.UI/css/common.css" />

<link rel="stylesheet" type="text/css" href="/Telerik.UI/css/dark.css" />

<script type="text/javascript" src="/Telerik.UI/js/jquery.js"></script>

<script type="text/javascript" src="/Telerik.UI/js/ui.js"></script>

<link href="/css/default.css" rel="stylesheet" />

<link href="/pages/split/split.css" rel="stylesheet" />

<script src="/js/data.js"></script>

<script src="/pages/split/split.js"></script>

</head>

<body>

<!-- This template is used to display each item in the ListView declared below. -->

<div class="itemtemplate" data-win-control="WinJS.Binding.Template">

<div class="item-info">

<h3 class="item-title win-type-ellipsis" data-win-bind="textContent: title"></h3>

<h6 class="item-subtitle win-type-ellipsis" data-win-bind="textContent: typeOfTask.title"></h6>

<h4 class="item-description" data-win-bind="textContent: completedDate"></h4>

</div>

</div>

<!-- The content that will be loaded and displayed. -->

<div class="splitpage fragment">

<header aria-label="Header content" role="banner">

<button class="win-backbutton" aria-label="Back" disabled></button>

<h1 class="titlearea win-type-ellipsis">

<span class="pagetitle"></span>

</h1>

</header>

<div class="itemlistsection" aria-label="List column">

<div class="itemlist" aria-label="List of this group's items" data-win-control="WinJS.UI.ListView" data-win-options="{ selectionMode: 'single', tapBehavior: 'toggleSelect' }"></div>

</div>

<div class="articlesection" aria-atomic="true" aria-label="Item detail column" aria-live="assertive">

<article>

<h2 id="statusMessage" style="display:none;">

</h2>

<div id="articleContents" class="article-hidden">

<input id="taskKey" type="hidden" data-win-bind="value: key" />

<div class="article-row">

<h4>Title</h4>

<input id="taskTitle" style="width:400px;" data-win-bind="value: title" />

</div>

<div class="article-row">

<h4>Type</h4>

<input id="taskType"

data-win-control="Telerik.UI.RadDropDownList"

data-win-options='{

dataTextField: "title",

dataValueField: "id",

}' />

</div>

<div class="article-row">

<h4>Completed Date</h4>

<div id="taskCompletedDate"

style="float:left;"

data-win-control="WinJS.UI.DatePicker"

data-win-options="{disabled:false,maxYear:2020,minYear:2001}">

</div>

</div>

<div class="article-row">

<h4>Assigned To</h4>

<input id="assignedTo"

data-win-control="Telerik.UI.RadDropDownList"

data-win-options='{

dataTextField: "name",

dataValueField: "key",

}' />

</div>

<div class="article-row">

<h4>Estimated Hours</h4>

<input id="taskEstimatedHours"

data-win-control="Telerik.UI.RadNumericBox"

data-win-options='{ format: "n0", min: 0, max: 100 }' />

</div>

</div>

</article>

</div>

</div>

</body>

</html>

5 Answers, 1 is accepted

Sort by
0
Accepted
Lini
Telerik team
answered on 12 Jul 2012, 01:24 PM
Hello John,

Starting with the beta release, we adopted a unified approach for creating our controls - all dropdown and textbox controls should be created using a <span> tag. This is to remove confusion (whether you should use input, select, etc).

To fix your issue, define your NumericBox using a span:

<span id="taskEstimatedHours"
data-win-control="Telerik.UI.RadNumericBox"
data-win-options='{ format: "n0", min: 0, max: 100 }' ></span>


Regards,
Lini
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
John DeVight
Top achievements
Rank 1
answered on 12 Jul 2012, 01:45 PM
Hi Lini,

I tried changing to a span, but am now getting the following error:

"Invalid argument: the host element is invalid.  RadNumericBox must be hosted by an INPUT element"

I have version 2012.1.0611

Do I need a different version?

Regards,

John DeVight
0
Lini
Telerik team
answered on 12 Jul 2012, 01:48 PM
Hello,

Yes, we have a new build (official beta) available on our site. The new version is 2012.1.711. Go to our metro page http://www.telerik.com/products/windows-metro/overview.aspx and click the "Download the Beta" link to get it.

Kind regards,
Lini
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
John DeVight
Top achievements
Rank 1
answered on 12 Jul 2012, 01:56 PM
Thanks Lini!  This fixed the RadNumericBox, but now the RadDropDownList is no longer working :-(  Will try and get it working, but if not, I'll post a thread in the DropDownList forum.
0
Russell.Asher
Top achievements
Rank 1
answered on 12 Jul 2012, 07:07 PM
Its also worth noting that the sample code on this thread will work with the new telerik metro release you just have to delete the old reference and add the new ones.  The ones I used to make it work were:



Telerik.Core

Telerik.UI.XAML.Chart

Telerik.UI.XAML.DataVisualization

Telerik.UI.XAML.Input

Telerik.UI.XAML.Primitives





hope this helps
Tags
NumericBox for HTML
Asked by
John DeVight
Top achievements
Rank 1
Answers by
Lini
Telerik team
John DeVight
Top achievements
Rank 1
Russell.Asher
Top achievements
Rank 1
Share this question
or