Hello There,
I have two lists: 1) Grid 2) DropdownList. I can add new row to the grid from the dropdownlist selection. What I like to accomplish is to edit the dropdownlist, when the row is selected in the Grid. I can see my selection but my code failed to update the dropdownlist. Your help is greatly appreciated
Here are the codes
I have two lists: 1) Grid 2) DropdownList. I can add new row to the grid from the dropdownlist selection. What I like to accomplish is to edit the dropdownlist, when the row is selected in the Grid. I can see my selection but my code failed to update the dropdownlist. Your help is greatly appreciated
Here are the codes
onSelect : function(e) { e.preventDefault(); var self = this; window.console && console.log("MVN what is self here: "+self); var kendoGrid = $("#facultySupportGrid").data("kendoGrid"); var selectedRow = kendoGrid.select(); var selected = kendoGrid.dataItem(selectedRow); if (selected !== null) { self.set("addFacultySupportSectionVisible", true); self.set("selectedId", selected.id); alert(selected.facultyFullName) self.set("selectedFullName", selected.facultyFullName); // Hide button when fields are expanded self.set("hideAddFacultyButton", false); } },
<h2>Add Faculty Information</h2>
<label class="control-label">Name*:</label>
<input id="newFacultyDropDown" name="newFacultyDropDown" data-role="dropdownlist"
data-option-label="- select faculty -"
data-auto-bind="true"
data-text-field="value"
data-value-field="key"
data-bind="value: selectedFullName,source: fundingFacultiesList" required validatemessage="Name is required" />
<span class="k-invalid-msg" data-for="newFacultyDropDown"></span>
</div>