Is there any way to highlight selected row of Table Record List

Hi there.

Is there any way to to highlight selected row of Table Record List.

We are considering to locate the Table Record List and description in the same page like below.

(The description is made with a Web Block)


As I said before, how can I implement this highlight function...?


Thank you in advance.


Best Regards.


You can keep a additional flag in the record list like isselcted (initially set to false) and also keep the conditional css on the (if (isselected , "background-color:blue,"") and set the value of this variable to true once you click on it and refresh the row.

Let me know if you need an example .


Regards,

-PJ-




Hi Yukiya Miyamoto,

As per the explanation of Pramod Sir, Please find the attached Demo OML file

https://vermaamit52.outsystemscloud.com/DemoTableRecordList/DemoScreen.aspx?_ts=637200470814564239

Hope this will help :)

Thanks,

AV

Hi Yukuya,

I didn't check the OML above but as far what pramod recommends to use the variable.And I guess this can be easily achieved by JS.

You can try with below approach :

In the extended properties of the row , declare the

onclick

And it's value as 

("document.getElementById('" +Table.Id +"').style.borderColor='#ColorCode'")


Ref :

https://www.outsystems.com/forums/discussion/54582/setting-a-selected-row-as-active-element-with-specified-color/


Hope this help,

Assif 

Amit Verma wrote:

Hi Yukiya Miyamoto,

As per the explanation of Pramod Sir, Please find the attached Demo OML file

https://vermaamit52.outsystemscloud.com/DemoTableRecordList/DemoScreen.aspx?_ts=637200470814564239

Hope this will help :)

Thanks,

AV


This refreshes the whole table which might not be suitable for large tables.

Hi Yukiya,


Attached is the sample code, where client side logic is used to highlight the selected row of Table Record.

Do let me know if it works for you.


Kind Regard's,

Lakshmi Kumar Yadav

Lakshmi Kumar Yadav wrote:

Hi Yukiya,


Attached is the sample code, where client side logic is used to highlight the selected row of Table Record.

Do let me know if it works for you.


Kind Regard's,

Lakshmi Kumar Yadav

Lakshmi ..This solution works. I had a similar issue using "loadonvisible" for images in a list which prevented the highlight script to run. Also when using table sorting the script will stop.

Hey Lennard,

Please find the attached oml.

I have tried to implement the script while sorting the table.

Also i have used "LoadOnVisible".

Do let me know, if i have correctly used and it works for you.


Thanks,

LK

Lakshmi Kumar Yadav wrote:

Hey Lennard,

Please find the attached oml.

I have tried to implement the script while sorting the table.

Also i have used "LoadOnVisible".

Do let me know, if i have correctly used and it works for you.


Thanks,

LK

Hey Lakshmi,

Thanks, I've implemented the solution and it works.


Lennard