Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
620
Paging buttons work with mousedown and selection with mouseup
posted

I've a grid that uses both Selection and Paging features.

The problem is that paging buttons work with mousedown and selection with mouseup. This is an issue because when the last page has fewer elements than the other pages, the user clicks 'Previous' (or 'First' or a page number, whatever), the grid goes to that page and when the user releases the mouse button, the row below the cursor is selected. I need to avoid this to happen. How can I do?

I've thought a workaround but I don't know how to do it: the grid's body should have always the same height (according to the amount of items per page). So if each row has a height of 40px and there are 15 items per page, the grid's body should have a height of 600px. If there are only 10 elements shown, then the grid's body should have 200px empty below those elements. Is there any way to achieve this?

Thanks.

Parents
  • 17590
    Offline posted

    Hello intecomp,

    Thank you for posting in our community.

    I tested your scenario and I was unable to reproduce the behavior that you are describing. I created a grid and enabled Paging and Selection features. I am handling rowSelectionChanged event and I am showing an alert when it is fired. When I have fewer records on the last page and click Previous page button when the mouse is released the row that is underneath the cursor is not getting selected. It is only getting the hover style applied since it is currently hovered.

    Could you please have a look at my sample at:http://jsfiddle.net/xr3os7pj/ and let me know what is the result of your test. How it behaves on you side may help me indicate the nature of this issue.

    If this is not an accurate demonstration of what you are trying to achieve please feel free to modify my sample in order to reproduce the issue.

    Looking forward to hearing from you.

Reply Children