Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @(Html.Kendo().DropDownList()
- .Name("productionLine-dropdown")
- .DataTextField("Name")
- .DataValueField("Id")
- .DataSource(source =>
- {
- source.Read(read => { read.Action("GetDropDownList", "Home"); });
- })
- .Events(e =>
- {
- e.Close("OnClose");
- })
- )
- <div id="Dashboard">
- @Html.Partial("~/Views/Home/_Home.cshtml", Model)
- </div>
- function OnClose() {
- var selectProductionLine = $("#productionLine-dropdown").data("kendoDropDownList").value();
- $("#Dashboard").load('/Home/UpdateView', selectProductionLine);
- }
- function DropDownValue() {
- var value = $("#productionLine-dropdown").data("kendoDropDownList").value();
- return { selectProductionLine: value };
- }
- public ActionResult _Home(DisplayViewModel dvm)
- {
- return PartialView(dvm);
- }
- public ActionResult UpdateView(string selectProductionLine)
- {
- DisplayViewModel dvm = new DisplayViewModel();
- //Some logic
- return PartialView("~/Home/_Home.cshtml", dvm);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement