Table Records Select Row

Table Records Select Row

  

Good day.


Is there a way I can make a Table Records where User can click and select a ROW w/o using a checkbox and get the selected value.

Thank you.

Hi,


A way to make the row clickable is to place a Container in each cell with width set to "Fill Parent". You can then associate a On Click action to the containers to do any logic that you need. Note: this doesn't work so well when the row different amount of text in each column that it takes multiple lines (as the containers won't take full height in the columns with less content).


There are other alternatives using the extended properties of the rows and javascript to keep track of the selections, but onclicks in rows are known to have problems in some IOS devices. I would stick with my first suggestion unless you have really good javascript skills and understood what it was necessary to do with just this hint.

There are other threads in this forum regarding the subject as well.


Regards,

João Rosado

Thank you for the feedback Sir João.

The first option might do the job but how can I change the style of the selected row to make it look like it is selected?

Hello Joao,

Is there any way to pass the selected row item data to onClick action?

Hi Ervin


In the first option you can pass the current record (or some identifier if the complete row is not needed) as a argument of the action that you associate with the On Click handler.


Regards,
João Rosado

Hi,


Can you share a sample solution that changes the style upon clicking of the row?