Pending Review
Last Updated: 19 Dec 2014 10:12 by Telerik Admin
Imported User
Created on: 26 Nov 2014 10:28
Category: Data Source
Type: Feature Request
3
Use a consistent binding model
<span data-format="dd MMM yyyy" data-bind="text: Created"></span>

Spits out (as text inside the span)...
   Fri Aug 01 2014 01:00:00 GMT+0100 (GMT Daylight Time)

Whereas ...
<input class="k-input" data-bind="value: Created" data-format="dd MMM yyyy" data-role="datepicker">

Spits out "01 Aug 2014" in the editable field.

Feedback from telerik: "span doesn't have data-format support".

Databinding telerik obervables to templates appears to be working in a completely different way to binding to telerik controls, this is confusing and causes a lot of frustration.

var model = { any js object };
var component = $("anything");
kendo.bind(component, model);

This should result in the same output no matter what model is (datasource, observable, flat js object).

Using: 
   $("selector").kendoControl({ options }); 

should behave the same as:  
<div id="myThing" data-bind=" options " />

kendo.bind($("myThing"), model);
1 comment
Imported User
Posted on: 19 Dec 2014 10:12
I came across a very similar problem with grids today, a template which includes <span>#= SomeVal #</span> will produce the correct output but a template that includes <span data-bind="text: SomeVal" /> does not. It doesn't seem like a big deal but it now means that I need multiple sets of templates to solve the same problem in slightly different situations. (eg: straight bind vs using a kendo grid).