Hai
I am creating a MVC4 razor Application using Kendo controls. In my application I supposed to open a view as popup. For that I am using kendow window control. Am using the below code to open the popup.
@(Html.Kendo().Window()
.Name("Searchwindow")
.Title("user Search")
.LoadContentFrom("../usersearch")
.Draggable()
.Resizable()
.Width(700)
.Visible(false)
The view is open as popup and works fine. But whenever the post action occurs in the view the page is opened as page like http://localhost:4376/usersearch.
I have to show the same popup to the user when the form is posted. How to show the same popup when an action is posted on the view page? Is it possible to open the view as popup after the action completion?
Thanks
@(Html.Kendo().Menu() .Name("ProductBookMenu") .OpenOnClick(true) .CloseOnClick(true) .Items(items => { items.Add() .Text("Product Book") .Content(Html.Partial("ProductBook", Model.ItemModelList).ToHtmlString()); }))@model List<Company.Product.MVC.Models.ItemModel>@using Kendo.Mvc.UI<script>function PopulateItemGrid() { var productBookGrid = $("#ProductBookGrid").data("kendoGrid"); var itemGrid = $("#QuoteItemGrid").data("kendoGrid"); productBookGrid.select().each(function () { var dataItem = productBookGrid.dataItem($(this)); itemGrid.dataSource.add(dataItem); }); $("#ProductBookMenu").data("kendoMenu").close("#Item1");}</script>@(Html.Kendo().Grid(Model) .Name("ProductBookGrid") .Columns(columns => { columns.Bound(i => i.FreightClass).Width(70); columns.Bound(i => i.DimensionLength).Width(70); columns.Bound(i => i.DimensionWidth).Width(70); columns.Bound(i => i.DimensionHeight).Width(70); columns.Bound(i => i.DimensionUnitOfMeasure).Width(70); columns.Bound(i => i.QuantityQuantityValue).Width(70); columns.Bound(i => i.QuantityUnitOfMeasure).Width(70); columns.Bound(i => i.WeightWeightValue).Width(70); columns.Bound(i => i.WeightUnitOfMeasure).Width(70); columns.Bound(i => i.NmfcCode).Width(75); columns.Bound(i => i.ItemDescription).Width(150); }) .ToolBar(toolbar => { toolbar.Custom().Text("Add").Url("#_").HtmlAttributes(new { onclick = "PopulateItemGrid()" }); }) .Pageable() .Sortable() .Scrollable() .Filterable() .Resizable(resize => resize.Columns(true)) .Reorderable(reorder => reorder.Columns(true)) .DataSource(dataSource => dataSource .Ajax() ) .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple)))