Hello,
I am setting fields in the add/edit dialog via Javascript, whenever a user selects a drop-down value.
Here is the Javascript drop-down event handler:
function itemDropDownHandler(args) {
var grid = $("#@gridId")[0].ej2_instances[0];
var form = grid.editModule.formObj.element;
var price = form.querySelector("#@(gridId)@(nameof(InvoiceItemViewModel.Price))");
var markdown = form.querySelector("#@(gridId)@(nameof(InvoiceItemViewModel.Markdown))");
price.value = args.itemData.@nameof(InvoiceItemViewModel.Price);
markdown.value = args.itemData.@nameof(InvoiceItemViewModel.Price);
}
Here is what happens when trying to save the form:
If I manually click on Price and Markdown, then the save is successful, but I obviously don't want to force the user to do this.
Thanks,
Derek B