Hello,
I am using customeditortemplate with a checkbox for SaveinOutlook. taskViewModel has boolean property IsSavedInOutlook and Models.Utility.SaveInOutlook is the default value for add events. My customeditortemplate checkbox is as below
<div class="k-edit-label">
@(Html.LabelFor(model => model.IsSavedInOutlook))
</div>
<div data-container-for="isSavedInOutlook" class="k-edit-field">
@if (//add event?? Models.Utility.SaveInOutlook == true)
{
<input data-bind="checked: isSavedInOutlook" data-val="true" id="IsSavedInOutlook" name="IsSavedInOutlook" type="checkbox" checked/>
} else{
<input data-bind="checked: isSavedInOutlook" data-val="true" id="IsSavedInOutlook" name="IsSavedInOutlook" type="checkbox" />
}
</div>
is there a way i can differenciate it is add event or edit event and set checked based on Models.Utility.SaveInOutlook value? When the customedittemplate popup window comes do a have a way to check add/edit mode and set a default value?
Anamika
I am using customeditortemplate with a checkbox for SaveinOutlook. taskViewModel has boolean property IsSavedInOutlook and Models.Utility.SaveInOutlook is the default value for add events. My customeditortemplate checkbox is as below
<div class="k-edit-label">
@(Html.LabelFor(model => model.IsSavedInOutlook))
</div>
<div data-container-for="isSavedInOutlook" class="k-edit-field">
@if (//add event?? Models.Utility.SaveInOutlook == true)
{
<input data-bind="checked: isSavedInOutlook" data-val="true" id="IsSavedInOutlook" name="IsSavedInOutlook" type="checkbox" checked/>
} else{
<input data-bind="checked: isSavedInOutlook" data-val="true" id="IsSavedInOutlook" name="IsSavedInOutlook" type="checkbox" />
}
</div>
is there a way i can differenciate it is add event or edit event and set checked based on Models.Utility.SaveInOutlook value? When the customedittemplate popup window comes do a have a way to check add/edit mode and set a default value?
Anamika