For some reason I seem to be unable to get any more than the following in the Kendo UI Grid:
HTML:
This is the JSON as the browser sees it:
I think I'm really close but can't make the last step to getting it working. All I get is a blank grid after the spinner runs.
HTML:
<
div
id
=
"grid"
></
div
>
<
script
>
var remoteDataSource = new kendo.data.DataSource(
{
transport:
{
read: {
type: "POST",
dataType: "json",
url: "/home/getopportunities/"
}
},
pageSize: 4
})
$("#grid").kendoGrid(
{
dataSource: remoteDataSource,
columns: [
{
title: "Title",
headerAttributes: {
style: "text-align:center"
},
attributes: {
"class": "table-cell"
},
width: 600,
filterable: true
},
{
title: "Activity Type",
headerAttributes: {
},
attributes: {
"class": "table-cell",
style: "text-align:center"
},
width: 100,
filterable: true
},
{
title: "Specialty",
filterable: true,
headerAttributes: {
style: "text-align:center"
},
attributes: {
"class": "table-cell",
style: "text-align:center"
}
},
{
title: "Total Credits",
format: "{0}",
headerAttributes: {
style: "text-align:center"
},
attributes: {
"class": "table-cell",
style: "text-align:center"
}
}
],
height: 430,
scrollable: true,
sortable: true,
pageable: true,
filterable: {
extra: false,
operators: {
string: {
contains: "Contains",
startswith: "Starts with",
eq: "Is equal to",
neq: "Is not equal to"
},
number: {
eq: "Is equal to",
neq: "Is not equal to",
gte: "Greater Than",
lte: "Less Than"
}
}
}
});
</
script
>
[
{
"ActivityID"
:367,
"Title"
:
"Non Webinar Test For Calendar"
,
"ActivityType"
:
"Other"
,
"TotalCredits"
:2,
"Specialty"
:
"[AB] [AE]"
},
{
"ActivityID"
:370,
"Title"
:
"Stage - Test SI Changes Part II"
,
"ActivityType"
:
"Other"
,
"TotalCredits"
:2,
"Specialty"
:
"[NE]"
},
{
"ActivityID"
:374,
"Title"
:
"Webinar Test Event For Calendar"
,
"ActivityType"
:
"Webinar"
,
"TotalCredits"
:2,
"Specialty"
:
"[FE] [NE] "
},
{
"ActivityID"
:401,
"Title"
:
"Module #1 Webinar: Learn Stuff"
,
"ActivityType"
:
"Webinar"
,
"TotalCredits"
:2,
"Specialty"
:
"[AB] "
,},
{
"ActivityID"
:403,
"Title"
:
"Module #3 Webinar: Learn Even More Stuff"
,
"ActivityType"
:
"Webinar"
,
"TotalCredits"
:2,
"Specialty"
:
"[AB] [AE]"
,}
]
I think I'm really close but can't make the last step to getting it working. All I get is a blank grid after the spinner runs.