@* Syncfusion Essential JS 2 Style *@
@* Syncfusion Essential JS 1 Style *@
@Styles.Render("~/Content/ej/web/bootstrap-theme/ej.web.all.min.css")
@Scripts.Render("~/Scripts/jquery-3.2.1.min.js")
@Scripts.Render("~/Scripts/jsrender.min.js")
@* Syncfusion Essential JS 2 Script *@
@* Syncfusion Essential JS 1 Script *@
@Scripts.Render("~/Scripts/ej/ej.web.all.min.js")
<script src="~/Scripts/ej/ej.unobtrusive.min.js"></script> |
<div>
@Html.EJS().Calendar("calendar").Render()
@Html.EJS().ScriptManager()
</div>
<div id="ControlRegion" style="height:500px ;position:absolute;">
<div>
@(Html.EJ().ReportViewer("reportviewer").ProcessingMode(Syncfusion.JavaScript.ReportViewerEnums.ProcessingMode.Remote).ReportPath("~/App_Data/Grouping Aggregate.rdl").ReportServiceUrl("/api/ReportAPI"))
</div>
@(Html.EJ().ScriptManager())
</div> |
<!DOCTYPE html>
<html style="position:relative;min-height:100%;">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title style="position : absolute">@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@* Syncfusion Essential JS 2 Style *@
@* Syncfusion Essential JS 1 Style *@
@Styles.Render("~/Content/ej/web/bootstrap-theme/ej.web.all.min.css")
@Scripts.Render("~/Scripts/jquery-3.2.1.min.js")
@Scripts.Render("~/Scripts/jsrender.min.js")
@* Syncfusion Essential JS 2 Script *@
@* Syncfusion Essential JS 1 Script *@
@Scripts.Render("~/Scripts/ej/ej.web.all.min.js")
@using Syncfusion.MVC.EJ
@using Syncfusion.JavaScript
@using Syncfusion.EJ2
<script src="~/Scripts/ej/ej.unobtrusive.min.js"></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("Application name", "Index", "Home", null, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
<li>@Html.ActionLink("Sales Report", "ReportViewerFeatures", "ReportViewer")</li>
</ul>
</div>
</div>
</div>
@*rendering the sidebar below the navigation tab*@
@Html.EJS().Sidebar("sidebar-menu").Width("200px").Created("onCreated").Type(Syncfusion.EJ2.Navigations.SidebarType.Push).ContentTemplate(@<div>
<!-- Sidebar content -->
<div class="title-header" style="text-align:center">
<ul>
<li class="sidebar-item" id="toggle">
<span class="e-text" title="menu">Menu</span>
</li>
<li class="sidebar-item">
<span class="e-text" title="home">Home</span>
</li>
<li class="sidebar-item">
<span class="e-text" title="profile">Profile</span>
</li>
<li class="sidebar-item">
<span class="e-text" title="info">Info</span>
</li>
<li class="sidebar-item">
<span class="e-text" title="settings">Settings</span>
</li>
</ul>
</div>
</div>).Render()
@*By default, sidebar will take the first successor div element after the Sidebar element as it target. In this sample, we have used default behavior to show case its behavior*@
@*We can also add the class "e-main-content" in any div element, to specify that as the Sidebar's target element*@
@*Please, go through our help documentation for better understanding https://ej2.syncfusion.com/aspnetmvc/documentation/sidebar/custom-context/?no-cache=1 *@
@RenderBody()
<script>
var win = window;
win.isManualResizeTrigger = true;
//Initialize the Sidebar after main content has been loaded in the child view page.
setTimeout(() => { win.dispatchEvent(new Event('resize')); }, 500);
document.addEventListener('DOMContentLoaded', function () {
sidebarInstance = document.getElementById("sidebar-menu").ej2_instances[0];
sidebarInstance.show();
});
</script>
<script>
function onCreated() {
var obj = document.getElementById("sidebar-menu").ej2_instances[0];
obj.mediaQuery = window.matchMedia('(min-width: 600px)');
}
</script>
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
@RenderSection("PreScripts", required: false)
@Html.EJS().ScriptManager()
<script>
$.extend(ej, Syncfusion);
</script>
<style>
/*custom styles of Sidebar*/
#sidebar-menu {
background: #007DD1;
}
#innertext {
color: white;
font-size: 15px;
font-weight: 500;
margin-top: 100px;
}
.sidebar-item {
list-style-type: none;
color: white;
padding: 8px;
cursor: pointer;
font-size: 15px;
}
.sidebar-item:hover {
background: #121589;
}
.title-header ul {
padding: 0 !important;
}
#sidebar-menu.e-sidebar.e-left {
top: 50px;
}
/*end of custom styles*/
</style>
</body>
</html>
|
@using Syncfusion.MVC.EJ
@using Syncfusion.JavaScript
@using Syncfusion.EJ2
@*on rendering the body element using @RenderBody() from the _layout view, Sidebar will consider the first div as it target element*@
@*Please, go through our help document for better understanding about this behaviour https://ej2.syncfusion.com/aspnetmvc/documentation/sidebar/custom-context/?no-cache=1*@
<div>
<div style="margin-left:30px;">
@Html.EJS().Calendar("calendar").Render()
<br>
<br>
@(Html.EJ().ReportViewer("reportviewer").ProcessingMode(Syncfusion.JavaScript.ReportViewerEnums.ProcessingMode.Remote).ReportPath("~/App_Data/Grouping Aggregate.rdl").ReportServiceUrl("/api/ReportAPI"))
</div>
</div>
<style type="text/css">
#reportviewer {
width: 700px !important;
height: 400px !important;
}
</style> |