or
[
{name:
"Olivia"
, email:
"olivia@olivia.com"
, showContactInfo: 1 },
{name:
"Michael"
, email:
"michael@yahoo.com"
,showContactInfo: 0},
{name:
"Peterl"
, email:
"pe@ter.com"
,showContactInfo: 0}
]
if
(showContactInfo)
// make the custom command visible for this row
<
div
id
=
"myform
"
>
<
input
type
=
"date"
id
=
"myDate"
name
=
"myDate"
data-date-msg
=
"Invalid date"
data-bind
=
"value: myField"
/>
<
br
/>
<
button
id
=
"show"
type
=
"button"
>Show selected</
button
>
<
button
id
=
"clear"
type
=
"button"
>Clear</
button
>
</
div
>
<
script
>
$(document).ready(function ()
{
var model = kendo.observable({ myField: new Date() });
$("#myDate").kendoDatePicker();
kendo.bind($("#myDate"), model);
var validatable = $("#myform").kendoValidator().data("kendoValidator");
$("#show").click(function ()
{
if (validatable.validate())
{
alert('Selected: ' + model.get("myField"));
}
});
$("#clear").click(function ()
{
model.set('myField', null);
});
});
</
script
>
I certainly don't want to be tied to Microsoft platforms but I do think this tool or something like is definitely needed by UX people. It would be nice to swap out the MS-JS stuff and swap in the KendoUI stuff. (or dojo, or whatever).
I am going to try this out and report back on how it works for me (but then I come from the XAML world).
$(document).ready(function () {
$("#grid").kendoGrid({
dataSource: {
type: "json",
transport: {
contentType: "application/json; charset=utf-8",
type: "POST"
}
},
pageSize: 10,
serverPaging: true,
serverFiltering: true,
serverSorting: true
});
});
var dataSource = new kendo.data.DataSource({
transport: {
read: {
// the remote service url
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "json
}
}
});