http://www.kendoui.com/code-library/mvc/mvc/scheduler/custom-editor.aspx
Hi everyone,
I want to create custom editor which is given above link. However, I want to add extra fields from my tablo this custom editor. Although I add extra fields such as example codes at below;
//extra field
public int ZTip { get; set; }
//Schedler
@(Html.Kendo().Scheduler<ZiyaretHareketleri>()
.Name("scheduler")
.Date(new DateTime(2014, 1, 20))
.StartTime(new DateTime(2014, 1, 20, 7, 00, 00))
//.Height(600)
.AllDaySlot(false)
.Editable(e =>
{
e.TemplateName("CustomEditorTemplate");
})
.Views(views =>
{
views.DayView(d => d.Footer(false));
views.WeekView(WeekView =>
{
WeekView.Selected(true);
WeekView.Footer(false);
});
views.MonthView();
views.AgendaView();
})
.Timezone("Etc/UTC")
.Group(group => group.Resources("Attendees").Orientation(SchedulerGroupOrientation.Vertical))
.Resources(resource => resource.Add(m => m.OwnerID)
.Title("Kullanıcılar")
.Name("Attendees")
.DataTextField("Name")
.DataValueField("UserId")
.DataColorField("Colour")
.DataSource(ds => ds.Read("GetKullanici", "Home"))
)
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.TaskID);
m.Field(f => f.Title).DefaultValue("Yeni Ziyaret");
m.Field(f => f.OwnerID).DefaultValue(1);
m.Field(f => f.Start);
m.Field(f => f.End);
m.Field(f => f.Description);
m.Field(f => f.IsAllDay);
m.Field(f=>f.ZTip); // Extra Field
})
.ServerOperation(true)
.Read(read => read.Action("Read", "Home").Data("filterData"))
.Create("Create", "Home")
.Destroy("Destroy", "Home")
.Update("Update", "Home")
)
)
//Custom Editor
<div data-container-for="ZTip" class="k-edit-field">
@(Html.TextBoxFor(model => model.ZTip, new { @class = "k-textbox", data_bind = "value:ZTip" }))
</div>
always I have been getting zero value from input.
Hi everyone,
I want to create custom editor which is given above link. However, I want to add extra fields from my tablo this custom editor. Although I add extra fields such as example codes at below;
//extra field
public int ZTip { get; set; }
//Schedler
@(Html.Kendo().Scheduler<ZiyaretHareketleri>()
.Name("scheduler")
.Date(new DateTime(2014, 1, 20))
.StartTime(new DateTime(2014, 1, 20, 7, 00, 00))
//.Height(600)
.AllDaySlot(false)
.Editable(e =>
{
e.TemplateName("CustomEditorTemplate");
})
.Views(views =>
{
views.DayView(d => d.Footer(false));
views.WeekView(WeekView =>
{
WeekView.Selected(true);
WeekView.Footer(false);
});
views.MonthView();
views.AgendaView();
})
.Timezone("Etc/UTC")
.Group(group => group.Resources("Attendees").Orientation(SchedulerGroupOrientation.Vertical))
.Resources(resource => resource.Add(m => m.OwnerID)
.Title("Kullanıcılar")
.Name("Attendees")
.DataTextField("Name")
.DataValueField("UserId")
.DataColorField("Colour")
.DataSource(ds => ds.Read("GetKullanici", "Home"))
)
.DataSource(d => d
.Model(m =>
{
m.Id(f => f.TaskID);
m.Field(f => f.Title).DefaultValue("Yeni Ziyaret");
m.Field(f => f.OwnerID).DefaultValue(1);
m.Field(f => f.Start);
m.Field(f => f.End);
m.Field(f => f.Description);
m.Field(f => f.IsAllDay);
m.Field(f=>f.ZTip); // Extra Field
})
.ServerOperation(true)
.Read(read => read.Action("Read", "Home").Data("filterData"))
.Create("Create", "Home")
.Destroy("Destroy", "Home")
.Update("Update", "Home")
)
)
//Custom Editor
<div data-container-for="ZTip" class="k-edit-field">
@(Html.TextBoxFor(model => model.ZTip, new { @class = "k-textbox", data_bind = "value:ZTip" }))
</div>
always I have been getting zero value from input.