Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145902 | Jul 12,2019 12:12 PM UTC | Jul 25,2019 08:45 AM UTC | ASP.NET MVC - EJ 2 | 7 |
![]() |
Tags: Grid |
JobName | Queued | LineNo |
---|---|---|
@Html.DropDownListFor(x => x.JobName, new SelectList(Model.Jobs, "Value", "Text"), "Job", new { style = "width: 450px;" }) | @Html.DropDownListFor(x => x.QueuedBeamStatus, new SelectList(Model.Queues, "Value", "Text"), "Queue", new { style = "width: 450px;" }) | @Html.DropDownListFor(x => x.LineName, new SelectList(Model.Lines, "Value", "Text"), "Line", new { style = "width: 450px;" }) |
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.datasource).Height("240").Columns(col =>
{=
col.Field("ShipCity").HeaderText("Ship City").CustomAttributes(new { @class = "orientationcss" }).Width("80").Add();
}).Created("setHeaderHeight").Render()
<script type="text/javascript">
function setHeaderHeight(args) {
var textWidth = document.querySelector(".orientationcss > div").scrollWidth; // obtain the width of the headerText content.
var headerCell = document.querySelectorAll(".e-headercell");
for (var i = 0; i < headerCell.length; i++) {
(headerCell.item(i)).style.height = textWidth + 'px'; // assign the obtained textWidth as the height of the headerCell.
}
}
</script>
<style>
.orientationcss .e-headercelldiv {
transform: rotate(90deg);
}
.e-grid .e-headercelldiv {
margin: 108px;
}
</style> |
|
|
<style>
.orientationcss .e-headercelldiv {
transform: rotate(90deg);
}
.orientationcss .e-headercelldiv {
text-align: center;
}
</style>
|
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.