|
<script type="text/javascript">
$(function () {
$("#Grid1").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
dataSource: ej.DataManager(window.gridData).executeLocal(ej.Query().take(30)),
commonWidth: 200,
allowScrolling: true,
columns: [
. .
],
dataBound: function (args) {
var scroll = this.getScrollObject();
scroll.model.thumbStart = function thumbStart(args) {
}
scroll.model.thumbEnd = function thumbEnd(args) {
}
scroll.model.wheelMove = function wheelMove(args) {
}
},
});
});
</script> |
|
<script type="text/javascript">
$(function () {
$("#Grid1").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
dataSource: ej.DataManager(window.gridData).executeLocal(ej.Query().take(30)),
columns: [
{ field: "OrderID", headerText: "Order ID", isPrimaryKey: true, isFrozen: true, validationRules: { required: true, number: true }, textAlign: ej.TextAlign.Right, width: 90 },
],
dataBound: function (args) {
var scroll = this.getScrollObject();
scroll.model.scroll = function scroll(args){
alert('trigger');
}
},
}); |
|
$("#Grid2").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
],
dataBound: function (args) {
var scrollGrid1 = $("#Grid2").ejGrid("instance").getScrollObject();
var scroll = this.getScrollObject();
var scrollEvt = scroll.model.scroll;
scroll.model.scroll = function(e){
console.log(e);
scrollEvt.apply(this,[e]);
}
}, |
here is the video: https://youtu.be/uVmIC2YAj8Y
Hi Farveen,Also in your video, you can see that the first row, the one just below the header, that should be frozen, disappear if you scroll down.In the options of both grids is specified:scrollSettings: { width: 500, height: 330, frozenRows: 1 },Please look at the attached screenshot for futher explanation.Review your video, or look at this youtube video, and you will see that the grids are not behaving as expected.The row containing the Ship City "Reims" should stay always on top.More info to identify and fix quickly the bug:
- Open your official demo page: http://js.syncfusion.com/demos/web/#!/bootstrap/grid/columns/frozenrowsandcolumns
- Click on the Edit button in order to open the associated playground
- Open the browser console
- Type this command: var sc = $("#Grid").ejGrid("instance").getScrollObject();
- Now let's scroll down the grid programmatically by typing: sc.scrollY(10);sc.scrollY(100);sc.scrollY(360); etc...
- You will notice that the frozen row will disappear, and the grid scroll will not work as expected.
here is the video: https://youtu.be/uVmIC2YAj8Y
Best,marco
Attachment: syncfusiongridbug_193a05d8.rar
|
<script type="text/javascript">
var sc = $("#Grid").ejGrid("instance").getScrollObject();
sc.scrollY(360,true)
</script> |