Scroll horizontally on grid while dragging column?

138 views
Skip to first unread message

mand...@gmail.com

unread,
Oct 30, 2013, 3:26:13 PM10/30/13
to slic...@googlegroups.com

I'm working with Slickgrid to display a large data set which may be used with anywhere from a few to 50 columns. I need the ability for users to reorder the columns as they wish, which I am currently able to do but with some inconvenience. If I happen to be grabbing the very last column and moving it to the front of a grid with several horizontal window widths of columns, I have to drag/drop and manually scroll left multiple times before I get the column positioned where I want it.

Does anyone know if there's a way to force the grid to automatically scroll horizontally based on where I'm trying to drag a column (i.e. when I attempt to drag the column outside the current grid viewport)?

Thanks!

Steve Fazekas

unread,
Oct 30, 2013, 3:36:53 PM10/30/13
to slic...@googlegroups.com
That's a good question...
I believe you may need to look into one of the Slick.grid.js or helper JS file internal functions to look at drag events and trigger the horizontal scroll.  I am not in favor of the potential headaches...

My opinion though is to try an alternative approach and create an external select list to re-order select options, set the columns in that order and then re-render the grid.  I think you'll save more time that way and users can see an easier way to reorder.

Steve Fazekas
--
You received this message because you are subscribed to the Google Groups "SlickGrid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slickgrid+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

mand...@gmail.com

unread,
Oct 31, 2013, 10:12:28 PM10/31/13
to slic...@googlegroups.com

Your alternative method seems like a much better solution anyway, thanks for the tip!

Amanda

You received this message because you are subscribed to a topic in the Google Groups "SlickGrid" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/slickgrid/xvPfyxgLUOA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to slickgrid+...@googlegroups.com.

Steve Fazekas

unread,
Nov 1, 2013, 8:49:15 AM11/1/13
to slic...@googlegroups.com
In my "view" configuration editor, I use the drag row plugin to set the order of columns for each grid I have displayed, so users can set this and save the column order permanently.  You may want to consider having the column order saved in the users profile.  

Meenakshi Sekar

unread,
Mar 9, 2016, 1:09:59 AM3/9/16
to SlickGrid
Hi, 

What is the option can anybody suggest how to scroll horizontally while dragging with more columns.
Reply all
Reply to author
Forward
0 new messages