EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on October 13, 2015, 09:02:16 PM



Title: Horizontal scroll button for un-frozen datagrid columns
Post by: devnull on October 13, 2015, 09:02:16 PM
I would like to add a left and right scroll button to my datagrid which has frozen columns, so that I can allow the use to scroll a calculated amount left or right.

I have tried this but it does not work:

Code:
  $('a#right').linkbutton({
    onClick: function(){
      $(".datagrid-view2").animate({scrollRight: 250}, 800);
    }
  })


Title: Re: Horizontal scroll button for un-frozen datagrid columns
Post by: stworthy on October 14, 2015, 02:27:05 AM
Please try this:
Code:
var body2 = $('#dg').data('datagrid').dc.body2;
body2.animate({scrollLeft: '250px'},800);