De-highlight Table View Cells when highlighting another Table View Cell


#1

Hi,

I’m trying to highlight a specific Table View Cell from the Table View but I want an event to de-highlight all the other cells previously highlighted when this happens (only one Table View Cell shall be highlighted at any point in time).

Is there a way? I can’t find a way to address the Table View Cells when I’m not directly interacting with them but only the one that triggers the event.

Best,
Riccardo


#2

Hello @signoretti.riccardo,

Yes you will find limited functionality in Dropsource on some of this. You do have some trigger points at your disposal hover like the “Cell Loaded”, and “prepare for reuse” TableView Cell events but not really the manual abilities to adjust properties like this on dynamic elements. I wish I had a better answer but I don’t at this time.


#3

Thank you @wade,

What would you suggest to “highlight” (show the user that a specific Table View Cell has been chosen) and allow to “de-highlight” every other Table View Cell “highlighted” before?

Which kind of control would allow me to address a specific Table View Cell or all of them? i.e. if I wanted to false the IsHighlighted?

Best,
Riccardo


#4

When you tap on a cell, the highlighting will show as you hold your finger down and it will stop highlighting when you bring your finger off the screen.

Only 1 cell will highlight, the 1 you touch. It stops highlighting when you release it. Try it out.

That’s the best your going to get in Dropsource currently for cell highlighting. If you want to add an image of some sort, you could add it to the cell. Then on the cells tap event you could show/hide that image element with the Set Value property “hidden” to TRUE.


#5

Right, but I need the cell to remain highlighted even when released to show to the user which cell is “active”.
The goal of that page for my app is to allow the user to modify the order of the elements of the Table View (then I’ll update the order on the server).

So the idea is:

  1. User touches cell that he/she wants to move up/down
  2. The cell becomes highlighted (Any new cell that is clicked takes the place of the highlighted cell so that only one cell is highlighted at any specific time)
  3. The up/down button is clicked to update the order

Questions:

  1. Any other idea on how to implement this solution?
  2. Is there any cell parameter that I can address from anywhere and not just the cell that I’m interacting with?
  3. Why when I add the following sequence, the cell does not remain highlighted? But if I remove the refresh it works?
    a) refresh table
    b) IsHighlighted = true

#6

Thanks for the details.

Hmmm… unique situation that should be complicated but I actually don’t think it will really work out for you in Dropsource. The issue I see first is that you are not going to really be able to tell the table to “unhighlight” the previously highlighted cell when you tap on a different cell because there are no access points to the dynamic list of data from a touch event or anything like that.

The issue is with how I will answer your question 2. If it’s dynamic data creating the cells, no there’s no way to say “unhighlight cell 14” for example. In code, it would be possible but in the Dropsource editor, there’s no point and click way to manipulate dynamic elements in this manner.

I think you need to remove the need to unhighlight from the ux. Perhaps you can tap a cell and do a confirm to move it up or down in the order or cancel. Don’t highlight the cell at all in this instance. Just produce the prompt with the choices.