<div id = "ControlRegion">
<div style="width: 500px">
@{Html.EJ().Tab("defaultTabs").ClientSideEvents(evt => evt.ItemActive("currentTab").Create("oncreate")).ShowCloseButton(false).EnablePersistence(false).HeaderPosition(HeaderPosition.Top).Items(data =>
{
data.Add().ID("steelman").Text("Tab 1").ContentTemplate(@<div>
</div>);
data.Add().ID("woldwar").Text("Tab 2").ContentTemplate(@<div>
@Html.EJ().FileExplorer("fileExplorer").Path("http://js.syncfusion.com/demos/ejServices/Content/FileBrowser/").AjaxAction(@Url.Content("http://js.syncfusion.com/demos/ejServices/api/FileExplorer/FileOperations")).IsResponsive(true).Width("100%").MinWidth("150px").Layout(LayoutType.Grid).EnableResize(true).Height("600px")
</div>);
}).Render();}
</div>
</div>
<script>
function currentTab() {
var fileExplorerObj = $("#fileExplorer").data("ejFileExplorer");
fileExplorerObj.adjustSize();
}
function oncreate()
{
$("#ControlRegion").css("display", "block");
}
</script>
<style>
#ControlRegion{
display: none;
}
</style> |
Hi, Keerthana
Personally, I don't like this solution.
I do'nt like to Add Css in View, which can cause confusion.
But it really can solve this problem.
Thanks,
Best regards.
@{Html.EJ().Tab("defaultTabs").ShowCloseButton(false).HtmlAttributes(new Dictionary<string, object>{{ "style" , "visibility:hidden"}}).ClientSideEvents(e=>e.Create("oncreate").ItemActive("currentTab")). Items(data =>
{
data.Add().ID("steelman").Text("Tab 1").ContentTemplate(@<div>
</div>);
data.Add().ID("woldwar").Text("Tab 2").ContentTemplate(@<div>
………………..
</div>);
}).Render();}<script>
function oncreate()
{
this.setModel({ htmlAttributes: { style: "visibility:visible" } })
}
</script>
|