I'm trying to create a custom column with the scheduler, but I always get redirected to a sample mvc program that just modifies the events template
I need to actually make a new column, not change the color of it.
The only templates I see listed in the docs are event templates. I need the schedule header. I want to display
<td>Monday</td><td>MyColumn1</td><td>MyColumn2</td><td>Tuesday</td>....
The dataHeaderTemplate only lets me change whats inside of Monday.
So my questions are, where are the lists of these templates and how do I get the default values so I can change them and create a new custom view.
This is the closest thing I've seen:
http://dojo.telerik.com/@diondirza/EbEBa
they're doing the following below. But how I get the default value for schedulerHeader and add change it for my customer view.
function
onDataBound(e) {
var
scheduler = e.sender,
schedulerHeader = scheduler.element.find(
".k-scheduler-header table tbody tr"
),
datas = scheduler.dataSource.data();
// add custom column header, do more append for more column
schedulerHeader.append(
"<th>Rating</th>"
);
schedulerHeader.append(
"<th>Time</th>"
);
// add custom column for each data
datas.forEach(
function
(data){
var
uid = data.uid,
timeData = kendo.toString(data.start,
"hh:mm"
) +
" - "
+ kendo.toString(data.end,
"hh:mm"
);
$(
".k-task[data-uid='"
+ uid +
"']"
).parent()
.after(
"<td>"
+ timeData +
"</td>"
)
.after(
"<td><em>no rating yet</em></td>"
);
});
}