|
// setting allowTextWrap as true wrap the text content
<ejs-grid id="Grid" dataSource="ViewBag.dataSource" allowTextWrap="false" allowPaging="true">
-----
</ejs-grid>
|
|
|
|
// setting allowTextWrap as true wrap the text content
<ejs-grid id="Grid" dataSource="ViewBag.dataSource" allowTextWrap="true" allowPaging="true">
<e-grid-textwrapsettings wrapMode="Content"></e-grid-textwrapsettings> -----
</ejs-grid>
|
|
<div id="scroll_wrapper1">
<div id="scroll_div"></div>
</div>
<div id="scroll_wrapper2">
<div id="grid_parent">
<ejs-grid id="Grid" dataSource="ViewBag.dataSource" allowTextWrap="true" height='100%' width='100%'>
<e-grid-textwrapsettings wrapMode="Content"></e-grid-textwrapsettings>
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID of the Item" isPrimaryKey="true" width="70"></e-grid-column>
<e-grid-column field="CustomerID" headerText="Customer Name" width="80"></e-grid-column>
<e-grid-column field="Freight" headerText="Freight" format="C2" width="140"></e-grid-column>
<e-grid-column field="ShipCountry" headerText="Ship Country" width="150"></e-grid-column>
<e-grid-column field="ShipCity" headerText="Ship City" width="150"></e-grid-column>
<e-grid-column field="ShipAddress" headerText="Ship Address to deliver" width="150"></e-grid-column>
</e-grid-columns>
</ejs-grid>
</div>
</div>
<script>
var wrapper1 = document.getElementById("scroll_wrapper1");
var wrapper2 = document.getElementById("scroll_wrapper2");
wrapper1.onscroll = function () {
wrapper2.scrollLeft = wrapper1.scrollLeft;
};
wrapper2.onscroll = function () {
wrapper1.scrollLeft = wrapper2.scrollLeft;
};
</script>
<style>
#scroll_wrapper1, #scroll_wrapper2 {
width: 600px;
overflow-x: scroll;
overflow-y: hidden;
}
#scroll_wrapper1 {
height: 20px;
}
#scroll_wrapper2 {
height: 500px;
}
#scroll_div {
width: 800px;
height: 20px;
}
#grid_parent {
width: 800px;
height: 500px;
overflow: auto;
}
</style>
|