Myself found the Solution.,
While loading Scheduler
there itself i have called script function and initialized events
.Events(eve => eve.Change("OnLoad")
In Partial View:
.DataSource
(
d => d.Model(m =>
{
m.Id(f => f.Id);
m.Field(f => f.Title).DefaultValue("No title");
m.RecurrenceId(f => f.RecurrenceId);
})
.Events(x => x.Error("kendoGridErrorHandle"))
.ServerOperation(true)
.PageSize(500)
.Read(x => x.Action("Scheduler_Appointment_Read", "Appointment").Data("Scheduler_SupplementData")).Events(eve => eve.Change("OnLoad"))
.Create(x => x.Action("Scheduler_Appointment_AddUpdate", "Appointment").Data("Scheduler_SupplementData"))
.Update(x => x.Action("Scheduler_Appointment_AddUpdate", "Appointment").Data("Scheduler_SupplementData"))
.Destroy("Scheduler_Appointment_Delete", "Appointment")
)
In Script:
function OnLoad() {
$('select[data-bind="value:ProcedureCode_Id"]').change(function () {
$('input[data-bind="value:title"]').val($('select[data-bind="value:Provider_Id"]')[0].selectedOptions[0].text + ", " + $('select[data-bind="value:ProcedureCode_Id"]')[0].selectedOptions[0].text);
});
$('select[data-bind="value:Provider_Id"]').change(function () {
$('input[data-bind="value:title"]').val($('select[data-bind="value:Provider_Id"]')[0].selectedOptions[0].text + ", " + $('select[data-bind="value:ProcedureCode_Id"]')[0].selectedOptions[0].text);
});
}