Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. @(Html.Kendo().DropDownList()
  2. .Name("productionLine-dropdown")
  3. .DataTextField("Name")
  4. .DataValueField("Id")
  5. .DataSource(source =>
  6. {
  7. source.Read(read => { read.Action("GetDropDownList", "Home"); });
  8. })
  9. .Events(e =>
  10. {
  11. e.Close("OnClose");
  12. })
  13. )
  14. <div id="Dashboard">
  15. @Html.Partial("~/Views/Home/_Home.cshtml", Model)
  16. </div>
  17.  
  18. function OnClose() {
  19. var selectProductionLine = $("#productionLine-dropdown").data("kendoDropDownList").value();
  20. $("#Dashboard").load('/Home/UpdateView', selectProductionLine);
  21. }
  22.  
  23. function DropDownValue() {
  24. var value = $("#productionLine-dropdown").data("kendoDropDownList").value();
  25. return { selectProductionLine: value };
  26. }
  27.  
  28. public ActionResult _Home(DisplayViewModel dvm)
  29. {
  30. return PartialView(dvm);
  31. }
  32.  
  33. public ActionResult UpdateView(string selectProductionLine)
  34. {
  35. DisplayViewModel dvm = new DisplayViewModel();
  36. //Some logic
  37. return PartialView("~/Home/_Home.cshtml", dvm);
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement