If I configure the grid to allow row "delete", then when I am on a PC with a mouse, if I hover over a row I can see the delete icon (the "x"). On mobile devices, however, the delete icon doesn't appear very easily. If I click on the row itself the icon still doesn't appear. On my surface with IE, if I long hold it does appear and then works properly. On an iPad, if I click the row and then move my finger slightly left or right it finally appears and works properly.
How can I easily get the delete icon to appear whenever I select a row on a touch device?
Hello Ryan,
I was able to reproduce this on Surface (IE browser). It seems that the button doesn’t stay visible when you swipe ( gets shown and then hides right away).
It seems to be a development issue introduced in 15.2. I have logged this behavior in our internal tracking system with a Development ID of 212834.
I’ve also opened a private case for you so that you can track the status of the development issue.
You can find the list of private cases associated with your account here:
https://ko.infragistics.com/my-account/support-activity
As a possible workaround until the issue is resolved I suggest handling the mouse leave event ( it is the event on which the delete button is typically hidden) and stopping it from bubbling up the dom so the grid won’t hide the button:
rendered: function(evt){
$("#grid > tbody > tr > td").on("mouseleave", function(evt){
//IE on touch has pointer events. If you want to limit the workaround’s behavior to just IE on touch you can add the following check.
if(window.navigator.msPointerEnabled){
evt.stopPropagation();
}
});
In this case when you tap on a row the button will show. I’ve attached a sample for your reference. I hope you find it useful.
Best Regards,
Maya Kirova
Infragistics, Inc.
http://ko.infragistics.com/support
FYI it does the same thing the sample referenced in what you sent me: http://www.igniteui.com/grid/basic-editing
From an iPad I can swipe in the above sample. From my Surface 4, swiping doesn't make the "x" stay visible. If I long hold, get the menu, click somewhere else to get rid of the menu, then the "x" stays and I can hit it and it properly marks the row for deletion. This is consistent with what I am seeing in my code as well but doesn't seem right to me.
Should swipe still work if I want edit mode set to "None"? I want to be able to delete but not add or edit the rows/cells.
It looks like when I have it set to this, it works from the iPad but not from the Surface. I still have to long hold on the Surface to get the "x" to stay there. That wouldn't be that bad, except long holding also brings up a browser menu that I have to clear away and then I can hit the "x".
And actually the same is true even in cell and row edit mode. Swipe doesn't work on the Surface. Am I missing something?
Thank you for posting in our forum!
For mobile devices, when edit mode is “cell”, the gesture that will show the delete button is swiping left or right.
For non-mobile devices where you operate with mouse and keyboard the delete button will display on hover.
For hybrid devices ( like Surface where you have both touch and mouse events) you can use both methods ( swipe when using the touch screen, or hover using the mouse).
You can find more details here:
http://www.igniteui.com/help/whats-new-in-2014-volume1#improved-delete-row-mobile
Let me know if you have any questions.