function onPopupOpen(args) {
if (args.type === 'Editor') {
var ImpData = @Html.Raw(Json.Encode(ViewBag.ImplementLst));
var statusElement = args.element.querySelector('#ImplementId');
if (!statusElement.classList.contains('e-dropdownlist')) {
var dropDownListObject = new ej.dropdowns.DropDownList({
placeholder: 'Choose status', value: args.data.ImplementId,
fields: { text: 'text', value: 'Id' },
dataSource: [
{ Id: 1, text: 'PROJECT 1' },
{ Id: 2, text: 'PROJECT 2' },
]
});
dropDownListObject.appendTo(statusElement);
statusElement.setAttribute('name', 'ImplementId');
}
var startElement = args.element.querySelector('#StartTime');
if (!startElement.classList.contains('e-datetimepicker')) {
new ej.calendars.DateTimePicker({ value: new Date(startElement.value) || new Date() }, startElement);
}
var endElement = args.element.querySelector('#EndTime');
if (!endElement.classList.contains('e-datetimepicker')) {
new ej.calendars.DateTimePicker({ value: new Date(endElement.value) || new Date() }, endElement);
}
}
};
|
hi there thanks for reply,i have an issue which is regarding the dropdown filling. if i fill the dropdown with static data it works fine if pulled from request it push an error of groupid undefinedthis is static data.dataSource: [{ Id: 1, text: 'Alice' },{ Id: 2, text: 'Nancy' },{ Id: 3, text: 'Robert' },{ Id: 4, text: 'Robson' },{ Id: 5, text: 'Laura' },{ Id: 6, text: 'Margaret'}]but i want it to be dynamic. please do guide me for this