Posted 17 July 2020, 8:35 am EST
Hello Team GrapeCity,
How we can achieve scrolling grid having 100 + columns from Left to Right with mouse click, not with horizontal scroll bar at bottom.
Forums Home / Wijmo / General Discussion
Posted by: ksm.ac.in on 17 July 2020, 8:35 am EST
Posted 17 July 2020, 8:35 am EST
Hello Team GrapeCity,
How we can achieve scrolling grid having 100 + columns from Left to Right with mouse click, not with horizontal scroll bar at bottom.
Posted 20 July 2020, 3:02 am EST
Hi,
There is a method on FlexGrid known as scrollIntoView. This method is used to scroll a row and/or column into view. Now, if you need to scroll horizontally, then just set the row parameter to -1 and provide the column index (like 100) and call this method.
Demo: https://www.grapecity.com/wijmo/demos/Grid/PagingScrolling/ScrollingandViewRange/purejs
This demo shows how to scroll to a row but you can update the method to scroll to a column.
API Link: https://www.grapecity.com/wijmo/api/classes/wijmo_grid.flexgrid.html#scrollintoview
Regards,
Ashwin
Posted 11 August 2020, 9:37 am EST - Updated 3 October 2022, 3:47 pm EST
Hello Ashwin
Hope you doing fine !
Our requirement is not full filling as i tried as per given suggestion.
In our case, we have more than 50 to 80 columns and 200 to 1000 rows .
our primary requirement is , user have privilege
P.S same way i have added in my code, #1 is not working in my side like cell wise move to right or left on cursor key.
Can you guide us & let us know what can be possible.
Thanks in Advance
Posted 12 August 2020, 8:04 am EST
Hi,
I am fine thanks for asking. Sorry, but I unable to understand your requirements properly. The 1st and 2nd points are already implemented by the FlexGrid by default. You can easily use the arrow keys to move the next/previous/up/down cell and you can also use the horizontal scrollbar to scroll the grid. However, the 3rd point will not be possible. The scrollbars displayed on the FlexGrid are not the actual scrollbars of the flexgrid but they are created manually. There is whole different div in the FlexGrid just for adding the scrollbar and it uses very complex code to scroll the grid.
Can you let me know your exact requirements so that I could assist you further?
~regards
Posted 13 August 2020, 12:05 am EST - Updated 3 October 2022, 3:47 pm EST
Thanks for the response.
Yes, #2. on mouse click and scroll left to right horizontally on the screen : it working.
But its not moving swiftly in one flow (left to right - right to left) on holding mouse click.
Its hanging in between . Not getting the issue of it .
See the attached image of given code
Posted 14 August 2020, 2:40 am EST
Hi,
It seems that your issue is that if we press the left/right button of the scrollbar using mouse, then it does not scroll to the extreme left/right in a continuous movement. Is this your issue? If not, can you provide a video or a screenshot which depicts your issue?
~regards
Posted 14 August 2020, 2:42 am EST
One more thing i noticed in this, grid scrolling start only when mouse cursor pointer touch left or right side of screen. Not grid side or grid container side.
Please let us know also this, how we over come this.
Posted 14 August 2020, 2:48 am EST
I think there seems to be a gap between our understanding. Using mouse, scrolling only occurs if you use mouse wheel, drag the scrollbar or click on the scrollbars buttons. I am not sure what are you referring to by this line:
grid scrolling start only when mouse cursor pointer touch left or right side of screen. Not grid side or grid container side.
Can you please elaborate your issue and provide a screenshot/video?
~regards