or
$(
'#element'
).data(
'kendoPanelBar'
).dataSource;
// undefined
@model IEnumerable<
Mvc3App.Models.Employee
>
@{
ViewBag.Title = "Index";
}
<
script
type
=
"text/javascript"
>
$(document).ready(function () {
alert('stopped');
$("#kjsimpleGrid").kendoGrid({
groupable: true,
scrollable: true,
sortable: true,
pageable: true
});
});
</
script
>
<
p
>
@Html.ActionLink("Add", "Create")
</
p
>
<
table
id
=
"kjsimpleGrid"
>
<
thead
>
<
tr
>
<
th
></
th
>
<
th
>Id</
th
>
<
th
>Last</
th
>
<
th
>First</
th
>
<
th
>Title</
th
>
<
th
>City</
th
>
<
th
>Region</
th
>
<
th
></
th
>
</
tr
>
</
thead
>
<
tbody
>
@foreach (var item in Model) {
<
tr
>
<
td
>
@Html.ActionLink("Edit", "Edit", new { id=item.EmployeeID }) |
@Html.ActionLink("Details", "Details", new { id=item.EmployeeID })
</
td
>
<
td
>@Html.DisplayFor(modelItem => item.EmployeeID)</
td
>
<
td
>@Html.DisplayFor(modelItem => item.LastName)</
td
>
<
td
>@Html.DisplayFor(modelItem => item.FirstName)</
td
>
<
td
>@Html.DisplayFor(modelItem => item.Title)</
td
>
<
td
>@Html.DisplayFor(modelItem => item.City)</
td
>
<
td
>@Html.DisplayFor(modelItem => item.Region)</
td
>
<
td
>@Html.ActionLink("Delete", "Delete", new { id=item.EmployeeID })</
td
>
</
tr
>
}
</
tbody
>
</
table
>
<div data-bind="text: person.lowerCaseName"></div>
to call a function that returns a lowercase string but if I do that on a select I just get the string representation of the function I declared. If I added parenthesis to the end then the correct value was displayed in the select box but that broke the code if I used an optionLabel, which leads into my next question.