(1) I am using MVC application with Kendo MVC wrapper with razor syntax.
I am trying to change a text of a tab item when a tab item is selected. How do i do that?
For example, disabling another tab-item when a tab is selected is NOT working with the current code.
==============================================================
event handler code (NOT working as far as disabling the tab item):
<script>
function tabMain_select(e) {
// gives valid item here - i checked in the debugger.
var tabstripD = $("#tabMain").kendoTabStrip().data();
$(tabstripD).disable(0);
</script>
===========================================================
Code that renders the tab with three tab items (this works):
@(Html.Kendo()
.TabStrip()
.Name("tabMain")
.Animation(false)
.Events(e=>e.Select("tabMain_select"))
.Items(tabs =>
{
tabs.Add().Text("Recent History")
.Selected(true) // Will render as this tab selected
.LoadContentFrom("About","home"); // to render a view into this tab.
tabs.Add()
.Text("Package")
.LoadContentFrom("About","home")
.HtmlAttributes(new { style = "margin-right:60px" }); // To give space after this tab but before the next tab item.
tabs.Add()
.Text("Dirty Returns")
.LoadContentFrom("About", "home");
}
)
)
=========================================================
I am trying to change a text of a tab item when a tab item is selected. How do i do that?
For example, disabling another tab-item when a tab is selected is NOT working with the current code.
==============================================================
event handler code (NOT working as far as disabling the tab item):
<script>
function tabMain_select(e) {
// gives valid item here - i checked in the debugger.
var tabstripD = $("#tabMain").kendoTabStrip().data();
$(tabstripD).disable(0);
</script>
===========================================================
Code that renders the tab with three tab items (this works):
@(Html.Kendo()
.TabStrip()
.Name("tabMain")
.Animation(false)
.Events(e=>e.Select("tabMain_select"))
.Items(tabs =>
{
tabs.Add().Text("Recent History")
.Selected(true) // Will render as this tab selected
.LoadContentFrom("About","home"); // to render a view into this tab.
tabs.Add()
.Text("Package")
.LoadContentFrom("About","home")
.HtmlAttributes(new { style = "margin-right:60px" }); // To give space after this tab but before the next tab item.
tabs.Add()
.Text("Dirty Returns")
.LoadContentFrom("About", "home");
}
)
)
=========================================================