In my view page, I have a button. When I click the button, I want to make the window open. The window has some tabstrips, and in the tabstrip I want to show a grid and pass a parameter to the grid. Does kendo UI allow me to do this?
Kendo Window--How to pass a parameter to the _TabStrip from my main view?(like the parameter is "paraA" string)
@(Html.Kendo().Window()
.Name("window")
.Title("About Alvar Aalto")
.Content(@Html.Partial("_TabStrip").ToHtmlString())
.Draggable()
.Resizable()
.Width(600)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close("onClose"))
)
_TabStrip (Partial View) --How to pass a para from _TabStrip to _Grid?(like the parameter is "paraA" string from main view)
@(Html.Kendo().TabStrip()
.Name("tabstrip")
.SelectedIndex(0)
.Items(items =>
{
items.Add()
.Text("Paris")
.Content(@Html.Partial("_Weather").ToHtmlString());
items.Add()
.Text("New York")
.Content(@Html.Partial("_Grid").ToHtmlString());
})
)
_Weather (Partial View)
<div class="weather">
<h2>17<span>ºC</span></h2>
<p>Rainy weather in Paris.</p>
</div>
<span class="rainy"> </span>
_Grid (Partial View)--How to get the parameter from _tabStrip?(like the parameter is "paraA" string from main view)
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.CustomerViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.ContactName).Width(140);
columns.Bound(c => c.ContactTitle).Width(190);
columns.Bound(c => c.CompanyName);
columns.Bound(c => c.Country).Width(110);
})
.HtmlAttributes(new { style = "height: 380px;" })
.Scrollable()
.Groupable()
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Customers_Read", "Grid").Data("GetParaFromMainView"))
)
)
//How to get the parameter from main View
function GetParaFromMainView(){
}