I am struggling a bit with this. I need to be able to set the Default values dynamically based on previously entered values. Currently I am storing the values in Session variables and pulling them with a regular jsonget. My problem is that I can't get the foreignkey dropdownlists to actually set the values, it sets them visually but when I try to update the popup. Note that I use the MVC extension.
Obviously if there are better way to handle dynamic default values I'd be happy to know.
I tried setting this value manually to a specific value also but it gave the same results. I have AutoBind false btw.
This is how I do it now (on the Edit event).
if (insertMode == true) {
$.getJSON('/TargetValue/GetDefaultValues', function (data) {
var kfval = data.kf;
$("#KeyFigureId").data("kendoDropDownList").value(kfval); <-- The value is set visually but the value registers as 0 when rying to post the save.
});
}
Obviously if there are better way to handle dynamic default values I'd be happy to know.
I tried setting this value manually to a specific value also but it gave the same results. I have AutoBind false btw.
This is how I do it now (on the Edit event).
if (insertMode == true) {
$.getJSON('/TargetValue/GetDefaultValues', function (data) {
var kfval = data.kf;
$("#KeyFigureId").data("kendoDropDownList").value(kfval); <-- The value is set visually but the value registers as 0 when rying to post the save.
});
}