Telerik Forums
Kendo UI for jQuery Forum
3 answers
1.7K+ views

How do you set the value of a numerictextbox client template. I've tried the following:
.Value("\\#=pollorder#")
.Value("\#=pollorder#")
.Value("#=pollorder#")
.Value(Convert.ToInt32("\#=pollorder#"))
All produce errors.

.Columns(columns => {
columns.Bound(s => s.ID).Visible(false);
columns.Bound(s => s.Order)
.ClientTemplate((Html.Kendo().NumericTextBox<int>()
.Name("order_#=ID#")
.Value("#=order#")
.Format("{0:n0}")
.Min(0)
.Max(100)
.Step(1)
.Decimals(0)
.Events(ev => ev.Change("numericBoxChanged"))
.ToClientTemplate()).ToHtmlString());
Petur Subev
Telerik team
 answered on 21 May 2013
1 answer
88 views
hi 
i have a dataSource that spits out data like this:
[{
Amount: "2140402000"
MDetail: "Budget"
Month: "Jan"
Monthnum: "1"
Year: "2013"
},
{
Amount: "2146823206"
MDetail: "Budget"
Month: "Feb"
Monthnum: "2"
Year: "2013"
},
{
Amount: "2257798847"
MDetail: "Projected"
Month: "Jun"
Monthnum: "6"
Year: "2013"
},
{
Amount: "2272474540"
MDetail: "Projected"
Month: "Jul"
Monthnum: "7"
Year: "2013"
}]

and the chart markup looks like htis
$J("#chart").kendoChart({
    dataSource: {
        data:source,
        group: {
            field: "MDetail",
            dir: "asc"
        },
        sort: [
            {field: "Year", dir: "asc"},
            {field: "Monthnum", dir: "asc"}
        ]
    },
    theme: "blueOpal",
    title: {
        text: "Total Cost of Workforce for " + year
    },
    legend: {
        position: "bottom"
    },
    seriesDefaults: {
        type: "area",
        format: "${0:0,000}"
    },
    series: [{
        field: "Amount",
        groupNameTemplate: "#= group.value # "
    }],
    valueAxis: {
        labels: {
            template: "#= kendo.format('$ {0:N0}', value / 1000000) # M"
        },
        majorUnit: 100000000,
        line: {
            visible: false
        },
        axisCrossingValue: -10
    },
    categoryAxis: {
        field: "Month",
        majorGridLines: {
            visible: false
        }
    },
    tooltip: {
        visible: true,
        format: "$ {0:0,000}"
    }
});


after feb - the 'budget' MDetail falls off to 0
and before jun - i dont know what the 'projected' MDetail does
its drawing a bunch of stuff

what im trying to achieve here is:
if there are no records for anything after feb
then dont draw anything - just cut it off 
ie dont descend to 0

and likewise if there are no records for the beginning
then dont draw anything until theres a record for the category 
ie it iwll be blank until jun and then the 'projected' numbers start drawing

how do i do this?

thanksa!

Iliana Dyankova
Telerik team
 answered on 21 May 2013
6 answers
987 views
By customer request I'm using a tooltip that only appears when explicitly clicked, and does not autohide.

The initialisation looks like:
$("#MyIdentifier").kendoTooltip({
    position: "right",
    autoHide: false,
    showOn: 'click',
    content: $('#calc1'),
    show: model.openCalculator,
    width: "224px"
});
This works like a charm, tooltips open when clicked and hide when explicitly closed (by a close button or clicking anywhere outside the tooltip).

The problem I'm encountering is that the tooltip element is within a division that has a handler for the click event too. And whenever the tooltip opens, the click handler for the surrounding div is being called too. This is undesired behaviour and I would like to know if anyone figured out a way to prevent this from happening?

You can see this behaviour in this simplified example:

http://jsfiddle.net/RedF/pgBNb/

All suggestions are appreciated!
Cheers,
 Fred
Fred
Top achievements
Rank 1
 answered on 21 May 2013
3 answers
172 views
i download  Kendo UI Complete v2013.1.514

according to http://docs.kendoui.com/getting-started/mobile/splitview   documention  , Set pane width to 300px or change the proportions to 1:3

this dosen't work ,that's why?
Kamen Bundev
Telerik team
 answered on 21 May 2013
1 answer
189 views
After the last update kendo ui web (2013.1.514) i get the error for the decimal type value.
Here are a few lines of code:

Site.Master
<script src="<%= Url.Content("~/Scripts/kendo/2013.1.514/jquery.min.js") %>"></script>
    <script src="<%= Url.Content("~/Scripts/kendo/2013.1.514/kendo.all.min.js") %>"></script>
    <script src="<%= Url.Content("~/Scripts/kendo/2013.1.514/kendo.aspnetmvc.min.js") %>"></script>
    <script src="<%= Url.Content("~/Scripts/kendo/2013.1.514/cultures/kendo.culture.ru-RU.min.js") %>"></script>
    <script src="<%= Url.Content("~/Scripts/kendo.modernizr.custom.js") %>"></script>
    <script type="text/javascript">
        //set culture of the Kendo UI
        kendo.culture("ru-RU");
    </script>
View
<a title="Сохранить (Ctrl + S)" class="k-button k-button-icontext" href="#" onclick="orderEditControlAction()" data-role="save"><span class="k-icon k-update"></span>Сохранить</a>
<form id="formOrderEdit" method="post">
        <%:Html.HiddenFor(m => m.OrderId) %>
        <%:Html.LabelFor(m => m.Order_Weight) %>
         <%:Html.EditorFor(m => m.Order_Weight) %>
         <%:Html.ValidationMessageFor(m => m.Order_Weight) %>
</form>
 
 
<script type="text/javascript">
    var validator = null;
    $(document).ready(function () {
        validator = $("#formOrderEdit").kendoValidator().data("kendoValidator");
    });
    function orderEditControlAction() {
         
        if (validator.validate()) {
            $.ajax({
                cache: false,
                type: "POST",
                url: "/Order/save",
                data: $('#formOrderEdit').serialize(),
                success: function (response, textStatus, jqXHR) {
                    //...
                },
                error: function (data) {
                    alert("Ошибка при выполнении сохранения!");
                }
            });
        }
        return false;
    }
</script>
Model
public class OrderEditViewModel
{
        [ScaffoldColumn(false)]
        Guid OrderId { get; set; }
 
        [DisplayName("Кол-во изделий в тоннах")]
        [UIHint("NumberDecimal")]
        decimal? Order_Weight { get; set; }
}
Edit template
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<decimal?>" %>
 
<%: Html.Kendo().NumericTextBoxFor(m => m)
       .Decimals(3)
       .Format("N3")
       .Step(0.001m)
       .Min(0)
       .HtmlAttributes(new { style = "width:100%" })
%>
Global.asax
Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("ru-RU");
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("ru-RU");
 
System.Web.Mvc.ModelBinders.Binders.Add(typeof(decimal?), new CultureAwareDecimalModelBinder());

When i try to submit this form i get validation error
Order_Weight is not valid.

I also notated that is success in IE9 (in IE10, Opera e FF work fine).


Georgi Krustev
Telerik team
 answered on 21 May 2013
1 answer
191 views
General sparklines question:

We're considering implementing sparklines in some of our forms, where we currently are implementing various DataViz charts (e.g. line, bar, area, etc.).  One thing that's been pointed out is that we can implement spark lines in a way now by rendering a small regular chart configured without the axes or grid lines visible. 

Besides some visual differences, are there any performance/overhead differences between sparklines and full charts?  Or do they pretty much use the same engine for rendering?
T. Tsonev
Telerik team
 answered on 21 May 2013
2 answers
493 views
Is there a way I can pass in additional data when the MultiSelect gets populated?

Georgi Krustev
Telerik team
 answered on 21 May 2013
1 answer
336 views
We are noticing a strange issue with a couple users who are using the Kendo upload.  I don't really understand it and can't reproduce it outside of it being an issue on their PC when running as them.  When they try to upload a file, they don't get any errors, but no file is uploaded.  A 500 error gets reported in IIS logs, but nothing shows up in the event viewer.  They don't even hit our event handler code that they are posting to.  The IE developer tools show "(pending...)" for most of the columns when I look at the post in the network section.  Uploading works fine for almost everyone else though, works as them from computers at other locations, and (the really crazy part) it works as another user at their location.  The only browser they have is IE, and I don't have install rights to put anything else on their PCs.  I'm not sure how much help I can get, since I can't really reproduce this issue, other than some very specific conditions.  I thought I would post it here though, in case anyone had any ideas...

Update: One of the users has IE 10 without compatibility on.  The other user with the issue has IE 9  with IE 7 compatibility on, and it had worked for her until some recent Microsoft update (not this month's patch Tuesday, before that).  The upload control renders fine for both of them. 
T. Tsonev
Telerik team
 answered on 21 May 2013
2 answers
216 views
hey all
im new kendo so id like your opinion

id like to be able to show any of your charts
but in a very dynamic way
ie, if i have a UI area in which i can change params
the chart will respond in kind

would it be best to :
  1.  bring down a full data set in a datasource, have it in mem and just filter thru the data
  2.  refresh the datasource on every param click
  3.  do it some other way you guys have thought of thats way better
thanks!
toy
Top achievements
Rank 1
 answered on 20 May 2013
2 answers
154 views
Hello!

I've noticed that tooltip gets truncated (rather than getting correctly re-positioned to fit chart area).
Bar chart (see attach): tooltip for "long" bars gets truncated.
Column chart (see attach): tooltip for  most right columns ALWAYS gets truncated.

Tooltips are super important for my scenario.
How can get this working properly?

KendoUI ver: 2013.1.319
Browsers: FireFox 20.0.1, Chrome 26.0.1410.64 m
Olga
Top achievements
Rank 1
 answered on 20 May 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Drag and Drop
Application
Map
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?