c# - kendo ui scheduler: Creating Complex Event Templates -
we trying looking flexibilities of kendo ui razor.
we using mvc4 razor view jqxwidgets , kendo scheduler
on custom event template want add jqx controls dropdownlist, text boxes, calender controls etc.
need in how can use defined resources , bind them jqx control
this scheduler:
@(html.kendo().scheduler() .name("ascheduler") .date(new datetime(2013, 6, 13)) .starttime(new datetime(2013, 6, 13, 7, 00, 00)) .height(600)
.editable(editable => { editable.templateid("updatetemplate"); }) .views(views => { views.dayview(); views.weekview(); views.monthview(monthview => monthview.selected(true)); }) .timezone("etc/utc") .resources(resource => { resource.add(m => m.reasonid) .title("reason") .datatextfield("text") .bindto(new[] { new { text = "john", value = 1, color = "#f8a398" } , new { text = "bob", value = 2, color = "#51a0ed" } , new { text = "dell", value = 3, color = "#56ca85" } }); resource.add(m => m.managerid) .title("owner") .datatextfield("text") .datavaluefield("value") .datacolorfield("color") .bindto(new[] { new { text = "john", value = 1, color = "#f8a398" } , new { text = "bob", value = 2, color = "#51a0ed" } , new { text = "dell", value = 3, color = "#56ca85" } }); }))
this update template:
"
# $("\\#templatereasonid").jqxdropdownlist({ source: data, selectedindex: 0 }); # // want data used above, come resources <div id="templatereasonid">reason type: </div> <div>hours: </div> <div>charge: </div> <div>comment:</div> <div>client</div>
"
kendo code library has example can create template in view. see example here.
Comments
Post a Comment