Hello Georgi,
I'm replying on a post that you posted 25 Aug 2015.
I added two checkboxes .. but i want to be able to read the value of it (true or false) and then in the update method do what i want to do with it.
The Problem is when i click on ab event to edit it, and i change only the value of the new checkboxes .. it wo'nt fire an update. it closes the edit popup and that's it !
Now event if edited another values, update will fires but there is no value from these two checkboxes ..
Here is the Code :
// Add Custom CheckBox and Label
var
newCheckBoxLabelVor = $(
'<div class="k-edit-label"><label for="Vorlauf">Vorlauf</label></div><div data-container-for="Vorlauf" class="k-edit-field"><input type="checkbox" name="Vorlauf" title="Vorlauf event" data-type="boolean" data-bind="checked:Vorlauf"></div>'
);
var
newCheckBoxLabelNach = $(
'<div class="k-edit-label"><label for="Nachlauf">Nachlauf</label></div><div data-container-for="Nachlauf" class="k-edit-field"><input type="checkbox" name="Nachlauf" title="Nachlauf event" data-type="boolean" data-bind="checked:Nachlauf"></div>'
);
// Wire it's click event.
//newCheckBoxVor.click(function (e) { alert("Checked"); });
// Add CheckBox to the contrainer
var
AllDay_Container = e.container.find(
"div[data-container-for= isAllDay]"
);
AllDay_Container.after(newCheckBoxLabelVor);
var
Vorlauf_Container = e.container.find(
"div[data-container-for= Vorlauf]"
);
Vorlauf_Container.after(newCheckBoxLabelNach);
So these Lines are in onEdit() function.
and i added these two checkboxes to the SchedulerViewModel :
public
bool
Vorlauf {
get
;
set
; }
public
bool
Nachlauf {
get
;
set
; }
and in the Update ActionMethod i wrote this :
bool
vorlaufBabe = eventVM.Vorlauf;
bool
NachlaufBabe = eventVM.Nachlauf;
can you please help me . . . . . .