jQWidgets Forums

jQuery UI Widgets Forums Grid Know when grid is scrolling

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Know when grid is scrolling #14808

    williamtourinho
    Participant

    Hi, is there a way to know when the user is doing scroll on the grid?
    It’s because I need to avoid change the source of the grid while the user is scrolling.

    Know when grid is scrolling #14821

    Peter Stoev
    Keymaster

    Hi williamtourinho,

    Do determine whether the user is scrolling, you can use the Scrollbars ‘isScrolling’ method.

    Example:

         $("#jqxgrid").jqxGrid(
    {
    width: 670,
    source: dataAdapter,
    theme: theme,
    ready: function()
    {
    var vScrollBar = $("#jqxgrid").jqxGrid('vScrollBar');
    var hScrollBar = $("#jqxgrid").jqxGrid('hScrollBar');
    var isVScrolling = vScrollBar.jqxScrollBar('isScrolling');
    var isHScrolling = hScrollBar.jqxScrollBar('isScrolling');
    },
    columnsresize: true,
    columns: [
    { text: 'Name', dataField: 'firstname', width: 100 },
    { text: 'Last Name', dataField: 'lastname', width: 100 },
    { text: 'Product', editable: false, dataField: 'productname', width: 180 },
    { text: 'Quantity', dataField: 'quantity', width: 80, cellsalign: 'right' },
    { text: 'Unit Price', dataField: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' },
    { text: 'Total', dataField: 'total', cellsalign: 'right', minwidth: 100, cellsformat: 'c2' }
    ]
    });

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.