0

I am working on mobile app and using slickgrid to show json data inside UIWebView in iOS app.

Slickgrid is well populated with data but problem is columns are not dragable nor reorderable on iPAD but on web it works fine. I want to know why it is not working on mobile/touch device. Is there any other js api I have to use to enable this column draging and reordering. Any help on this will be appreciable.

Paresh
  • 138
  • 1
  • 1
  • 8

1 Answers1

0

Simply put, draggable is not working on ipad or any touch device because it's not the same effect (or event) on touch. When you try that effect on touch, you actually do a "tap" event which is not a draggable. You can try to cheat by somehow transforming it as seen in this solution here: How can I make a jQuery UI 'draggable()' div draggable for touchscreen? which the answer points to the following Github project jQuery UI Touch Punch

I have to admit that I did not try it.. but it seems that only including that jquery.ui.touch-punch.js file after (or completely at the end) all the jQuery UI files and the draggable file that slickgrid use jquery.event.drag-2.2.js might be enough to work. I will most probably try it myself tonight at home, it seems like a really nice hack solution :)

Edit
I tried it on my Samsung S3 and it works..this is so easy, only had to include the hack (jQuery UI Touch Punch) after all files and bingo it now works on mobile (draggable)..sweet sweet :)

Community
  • 1
  • 1
ghiscoding
  • 12,308
  • 6
  • 69
  • 112
  • Thanks a lot it is column reorder is working for me on iPAD. But column resizing is still not working is there anything else I am missing out ? – Paresh Aug 06 '14 at 06:46
  • Yeah it seems like the resizing feature of a thin line to resize is just too small for a big finger... though in my case I use `minWidth`, `width` and `maxWidth` with auto-resize of the grid to get something decent. – ghiscoding Aug 06 '14 at 12:44