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.

1 Answer 1

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 :)

2
  • 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 6, 2014 at 6: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 6, 2014 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.