We are evaluating the use of Kendo UI for one of our internal web site development and we have come across an issue related Grid Foreign Key Column.
As shown in the picture attached, we need to populate the Billing Roles Dropdown in the Grid based on the Engagement selected. We are seeing multiple issues to do this. We have tried to use following javascript code to force the Dropdown to reload, the problem with the following approach is JQuery cannot find the DropDown element unless the Grid has New Row or existing rows. But even after having a Row populated in the grid, the dropdown was not getting reloaded with new options. I have placed the similar dropdown outside of the Grid, that grid is getting filtered without any issues.
var dropDown = $("#BillingRoleId").data("kendoDropDownList")
dropDown.dataSource.read();
We have even tried to reload the grid with the following javascript, but the dropdown list is not refreshed.
var grid = $("#BillingRoles").data("kendoGrid");
grid.dataSource.read();
The Dropdown list is getting stuck with the initially bounded options while loading the page. It does not seem pick up any modifications done on the ViewData. I am attaching the Model, View and Controller files with the request. Can you please review the same and help us unblock with this issue.
Project Details,
CreateNewRequest is the controller and AddBillingRoleRequestViewModel is the parent which will have collection of AddBillingRoleViewModel. We have created two partial views under CreateNewRequest folder. AddBillingRole.cshtml generates the Grid with the dropdowns. Index.cshtml renders _RequestFormSelect.cshtml and AddBillingRole.cshtml.
As shown in the picture attached, we need to populate the Billing Roles Dropdown in the Grid based on the Engagement selected. We are seeing multiple issues to do this. We have tried to use following javascript code to force the Dropdown to reload, the problem with the following approach is JQuery cannot find the DropDown element unless the Grid has New Row or existing rows. But even after having a Row populated in the grid, the dropdown was not getting reloaded with new options. I have placed the similar dropdown outside of the Grid, that grid is getting filtered without any issues.
var dropDown = $("#BillingRoleId").data("kendoDropDownList")
dropDown.dataSource.read();
We have even tried to reload the grid with the following javascript, but the dropdown list is not refreshed.
var grid = $("#BillingRoles").data("kendoGrid");
grid.dataSource.read();
The Dropdown list is getting stuck with the initially bounded options while loading the page. It does not seem pick up any modifications done on the ViewData. I am attaching the Model, View and Controller files with the request. Can you please review the same and help us unblock with this issue.
Project Details,
CreateNewRequest is the controller and AddBillingRoleRequestViewModel is the parent which will have collection of AddBillingRoleViewModel. We have created two partial views under CreateNewRequest folder. AddBillingRole.cshtml generates the Grid with the dropdowns. Index.cshtml renders _RequestFormSelect.cshtml and AddBillingRole.cshtml.