jQuery UI Widgets › Forums › Grid › jqxGrid in touch screens
This topic contains 9 replies, has 2 voices, and was last updated by harikalaprasath 11 years, 11 months ago.
-
AuthorjqxGrid in touch screens Posts
-
I have a touchscreen monitor. i have used jqxGrid. but touch doesnt works for me.
$(“#grid_content1”).jqxGrid(
{
width: ‘100%’,
height: ‘100%’,
source: dataAdapter,
//autoheight:true,
theme: theme,
altstart: 0,
virtualmode: true,
altrows: true,
enablehover: false,
//touchmode: true,
//keyboardnavigation: false,
//enablemousewheel: false,
selectionmode: ‘none’,rendergridrows: rendergridrows,
columns: [
{ text: ‘Event Code’, datafield: ‘event_code_row’ },
{ text: ‘Event Name’, datafield: ‘event_name_row’ },
{ text: ‘Event Status’, datafield: ‘event_status_row’ },
{ text: ‘Event Date time’, datafield: ‘event_date_time_row’ }
]
});Am i missing something? i dont find an API relating to touch under jqxGrid. so i assumed it takes care of itself.
If your Browser supports touch events, then the Grid will work on touch, too. If you’re running it on desktop PC and your browser does not have support for touch events, you will have to use the mouse. Touch behavior is automatically turned on, if the widget detects events like touchstart, touchmove, touchend – these are not available on desktop browsers, but are on devices like tablets and smartphones.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.combut jqxtouch works. i’m performing the scrolling of the grid by using jqxtouch by detecting the swipe and am using the method: $(‘#grid’).jqxGrid(‘ensurerowvisible’, ); to scroll down/up
i’ve even tried to set the property touchmode:true in jqxgrid
Actually the jqxtouch works on the grid only after setting this property.jqxTouch works on Desktop and Mobile and handles mousedown, mouseup, mousemove and also touchstart, touchend and touchmove. Setting ‘touchmode’ to true will simulate touch behavior with the mouse events, but this shouldn’t be done if you are using the widget on a browser that supports Touch events(browsers of Smarthphones and Tablets).
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comany suggestions for me?
What if i turn on the touch mode while using the widget in a smartphone or tablet?. Why this shouldn’t be done?
I need it working in touch supportive browsers(Smartphones … ) and also in desktop PC’s with Touch screens…If it runs on Tablets and Smarthphones, you shouldn’t do anything. It’s already built-in. For PC with Touch Screen, it depends on what the installed browser supports. If it’s an ordinary Desktop browser which most probably does not support touch events, the widget will not detect that it runs on touch and will not behave as being on a touch device.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks a tonne….
But i still dont get just 1 hint. what if i use touchmode:true in a widget running on a smartphone?I suggest you to set the touchmode only, if your intention is to use the widget on desktop. Othwerwise its automatically set.
var touchmode = 'auto';if (!$.jqx.mobile.isTouchDevice()) { touchmode = true;}// init your widget here.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThank You…
-
AuthorPosts
You must be logged in to reply to this topic.