Perspective Table selectedrow disable or change colour

Hi Folks,

Basically typical application is when i click any row, i am sending that data to respective tags. but after the data is send i want to disable that row or not edit that row. so that the user wont be able to select that row again.
i tried with selectedrow = None but it doesnt disable the row only deselect the row.

Thanks

You can style a row by adding style/value keys before the data.
You could add a background-color, or set the row a bit transparent with opacity, maybe change the cursor:not-allowed (for the cursor icon) and pointer-events:none (to prevent clicks)

You'll need some logic (session prop?) to keep track of what is selected i guess and do some script like this

As you mentioned to add style in each row data. but it need to be dynamic and not the static one. So i first need to create style for each and then check row style and apply the background color.

As you shared the topic, but i tried that also on transform but this also doesnt work.

Why not just remove the row from the table’s dataset?

The style is dynamic if you refresh the binding that provides this logic.
Just be sure to not run any queries there, but do them elsewhere with their own refresh rate^^

Does anyone know where I can find the documentation for witch property I can use with this way?

I had a similar issue and I set the style property for the cells to:

style = {"backgroundColor": "gray", "cursor":"not-allowed", "pointer-events":"none"}

This works but i can find the documentation for it.

You can use any style/css property.
So thats so much its not gonna fit in a simple list :stuck_out_tongue: