EasyUI Forum
April 29, 2024, 02:12:03 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid - OnCellOver disable scroll  (Read 6927 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« on: December 21, 2017, 02:01:44 AM »

I have a datagrid that has one column with cells containing unordered lists where the row has a fixed row height and the list style overflow = scroll.

Due to the varied length of these lists, it is necessary to scroll down to see the full list, but the problem is when using the mouse to scroll the whole table scrolls instead of just the cell which has the mouse focus.

How can I prevent the table from scrolling when the mouse is over a specific table column Huh

Logged

-- Licensed User --
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: December 21, 2017, 07:43:08 AM »

Please show an example to demonstrate how the unordered list work.
Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #2 on: December 21, 2017, 04:33:37 PM »

Thanks, but the unordered list is not really the problem, the problem is the datagrid vertical scrolling.

How can I prevent the datagrid from scrolling vertically ?

« Last Edit: December 21, 2017, 04:45:41 PM by devnull » Logged

-- Licensed User --
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: December 21, 2017, 06:47:50 PM »

If you don't wish the rows to be scrolled, please add the 'overflow:hidden' to the '.datagrid-body'.
Code:
<style type="text/css">
.datagrid-body{
overflow: hidden;
}
</style>
Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #4 on: December 22, 2017, 04:25:33 AM »

Hi Jarry;

I already tried that before posting this thread, it does not work.

I am using frozen columns.

Adding overflow:hidden prevents scrolling when you try and scroll on an unfozen column, but does not work when you scroll on the frozen columns.

It is the frozen columns that I need to prevent scrolling as that contains the column with my list.

« Last Edit: December 22, 2017, 04:29:55 AM by devnull » Logged

-- Licensed User --
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #5 on: December 22, 2017, 05:18:17 PM »

The frozen panel bound the 'mousewheel' event, so you should also to unbind it.
Code:
$(function(){
var dc = $('#dg').data('datagrid').dc;
dc.body1.unbind('mousewheel DOMMouseScroll');
})
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!