WKSwipeGestureRecognizer not working in cell of WKInterfaceTable - watchkit

I'd like to get swipes on certain cells within a WKInterfaceTable.
It is possible to add a WKSwipeGestureRecognizer to a group within a cell but the action is never called.
Adding the recognizer to the table works but this way I cannot get a reference to the cell that was tapped.
Any ideas/ or solutions to this issue?

Related

Ag-grid dynamically span entire row

I have a grid that presents database entities one per row with some crud options (the crud options are icons in their own cells). When the delete button is clicked, the design calls for the entire row to be turned into a confirmation message with buttons to continue or cancel.
Apparently you can give a function for colSpan on each colDef. I tried giving the first colDef a span equal to the number of displayed columns in the case that the row data has a property isDeleting === true, while clicking the delete icon would set the row data's isDeleting property to true.
I was unable to get this to work, and even if I were to get it to work, I'd need to be able to dynamically change the cell so that it contains the confirmation message.
Any help is greatly appreciated.
After a very long day of searching, I found this article on "full-width" rows. You can provide your gridOptions with an isFullWidthCell function, plus fullWidthCellRenderer and fullWidthCellRendererParams properties, and the full width of the row will be populated using the renderer according to the params (as is the case with a cellRenderer in a ColDef)
So, my delete button component can set a piece of data that the isFullWidthCell function can check for, and if it finds it, it will use the cellRenderer provided.
AgGrid seems to have thought of everything.

Using WKTapGestureRecognizer in WKInterfaceTable row

I'm looking to create a table in WatchKit (watchOS 4.3) that is essentially a grid view and am using a WKInterfaceTable to try to get there. I want 2 square items per row with each triggering a segue to another interface controller.
I have the list populating and everything looks great. However, I'm stuck on the gesture handling. I have a WKTapGestureRecognizer placed in each respective group covering the desired areas, however the connected actions never get triggered on tap.
I did a quick test using the same gesture recognizer outside of a table and it worked right away.
My question is, is it possible to use a WKTapGestureRecognizer in a WKInterfaceTable row? (I haven't been able to find anything in the docs saying this isn't possible)

What is the proper way to create subtable in a QTableWidget?

I have already implemented a subtable functionality in a QTableWidget. That is, if you click a row that contain a Left Arrow icon, a new row will be added and in there another instance of QTableWidget will be attached using setCellWidget.
All is working fine.. until I need to sort the table in an interval bases: this row that contain subtable, should be kinda sticky to its parent row. But, the sort method made them separate. I browse again the documentation, and I found this : QAbstractItemView#setIndexWidget. I am not sure how to implement this, but it seems like it will make the subtable attached to this row, without the need to add a new row.
Have you face this kind of issue before? Would love to know how you solve it
UPDATE
I think the proper way is indeed to use QAbstractItemView.setIndexWidget: it'll keep the data / model untouched so the rows can be properly sorted. We just have to properly display a new widget that don't override the current data appearance

GWT: Identify which Button in a Table was clicked

I am struggling with something which I think should be extremely easy.
I have a Grid in GWT, which I populate its cells with some textual data; at the last column I want to place a Button (or Image) which when clicked, I would like to take some action using the specific/associated data for that row.
I want to use a single ClickHandler for all the buttons. How can I then identify which button (and subsequently which row) has been clicked? Can I associate some sort of tag/identity value to a button (or Image) widget in GWT? With this identity/tag value, then I would be able to identify which row data I am working with.
Any clues?
In the handler use method getCellForEvent(ClickEvent event) of your Grid object. It will return HTMLTable.Cell object which has both row and column index. You pass the event object that has been delivered to the handler method. It works even if you have embed widgets in the cell and you get the click event for that widget.
Actually the method is defined in base HTMLTable, so you can use it also in FlexTable.

Need An Event To Fire After Leaving A Grid Control Filter DevExpress

Is there an event that fires after leaving a cell in a grid controls row filter?
The first row of my grid is a filter row, when I type something in the cell of and column in the filter row then select a row I want an event to fire.
What is happening is I have a lot of code in the gridView1s FocusedRow changed event, but when I use the filter then select the first row the Focusedrow event does not fire. If I select anything but the first first row returned the Focusedrow event fires and everything is fine, but I need to capture an event after you type something in a filter cell and select the first row in the grid.
I've tried to reproduce this issue using XtraGrid 9.3.4. but to no avail. Everything works as expected in my tests. So, I would suggest that you create a new ticket in the support center and upload a sample project. We will find the cause of the issue and let you know how to resolve it.

Resources