I have a TabStrip in the Index view for a controller:
And the initial level of 'Action' result is a view from the controller:
For example, for the Plan action, the controller definition for that is:
I return a View because then I can define a Layout file to load required javascript files. Somehow the tab has NO knowledge of the scripts loaded via the containing razor view of the TabStrip!
My 'Information' view looks like a normal view with a specific minimal layout file to load scripts
However, even with this manner of getting scripts to load, only the data-load scripts run. For example, the event scripts to handle the selected Kendo ComboBox item do not fire.
The combo box is in a partial view loaded by the view (loaded in the tab): In the example below, the language combo box loads languages, but the Select event does not fire.
So why can't the tabs see scripts loaded by the parent razor view/layout files?
Do I need to do something different with the tabstrip definition?
@{ ViewBag.Title = "My Index";}<div id="portal" class="k-content"> <div class="wrapper"> @(Html.Kendo().TabStrip() .Name("tabstrip") .Items(tabstrip => { tabstrip.Add().Text("Information") .Selected(true) .LoadContentFrom("Information", "MyController"); tabstrip.Add().Text("Schedule") .LoadContentFrom("Calendar", "MyController"); tabstrip.Add().Text("Plan") .LoadContentFrom("Plan", "MyController"); tabstrip.Add().Text("Pending") .LoadContentFrom("Pending", "MyController"); }) ) </div></div>@section Scripts{}And the initial level of 'Action' result is a view from the controller:
For example, for the Plan action, the controller definition for that is:
public ActionResult Information() { //get model data.... model = blaw blaw return View("Information", model);}I return a View because then I can define a Layout file to load required javascript files. Somehow the tab has NO knowledge of the scripts loaded via the containing razor view of the TabStrip!
My 'Information' view looks like a normal view with a specific minimal layout file to load scripts
However, even with this manner of getting scripts to load, only the data-load scripts run. For example, the event scripts to handle the selected Kendo ComboBox item do not fire.
The combo box is in a partial view loaded by the view (loaded in the tab): In the example below, the language combo box loads languages, but the Select event does not fire.
@(Html.Kendo().ComboBox() .Name("languagesDdf") .Placeholder("Select Language...") .DataTextField("LanguageValue") .DataValueField("LanguageId") .Suggest(true) .AutoBind(false) .HtmlAttributes(new { style = "width: 100%" }) .DataSource(source => { source.Read(read => { read.Action("GetLanguages", "Language"); }).ServerFiltering(true); }) .Events(e => { e.Select("onSelectLanguage"); }) )So why can't the tabs see scripts loaded by the parent razor view/layout files?
Do I need to do something different with the tabstrip definition?