186
Views
8
Comments
Solved
Disable an element from a list on Screen

Hi Team,

On a screen, 

  • I have a list of Tile 
  • I want to disable one of the tile based on a condition

    How can i achieve this ?


    thanks in advance

2022-07-22 08-49-20
Laura Fidalgo
Solution

Since a container is not a widget you can disable, you can always use the 'style' to create a dynamic 'disable style' for you containers

You can create something like this in your stylesheet (see here:https://stackoverflow.com/questions/44719980/how-to-prevent-the-click-event-using-css)

and in the value of the style, use an if condition. If the container meets your condition, set the style.

Cheers

2020-11-25 10-45-32
Mostafa Othman
Champion

Hello Saurabh,

I assume you are using list widget and bind titles to this list and display title as link which is clickable to do some actions. In this case I suggest to add If widget to list Item and based on your condition if it is true display link with Title if it is false display expression widget with title.

2021-11-19 13-48-33
Saurabh Sengar

Not Titles, i am saying tile . I want to show the tile but disabled.

2020-11-25 10-45-32
Mostafa Othman
Champion

Noted but same as I said you can use If widget for your List Item if condition is true display clickable widget if false display non-clickable widget (expression or container)

2022-07-22 08-49-20
Laura Fidalgo

Hello @Saurabh Sengar 

Just to be sure, do you mean you're using a gallery inside a list?

Can you be more specific? Do you want to disable images or a row in a list?

Can you post an image, for example?

Cheers



2021-11-19 13-48-33
Saurabh Sengar
  • I am using container in the list and which is clickable , 
  • on its click there is an OnclickAction .
  • So for one of the item in list i want to disable the container.
2022-07-22 08-49-20
Laura Fidalgo
Solution

Since a container is not a widget you can disable, you can always use the 'style' to create a dynamic 'disable style' for you containers

You can create something like this in your stylesheet (see here:https://stackoverflow.com/questions/44719980/how-to-prevent-the-click-event-using-css)

and in the value of the style, use an if condition. If the container meets your condition, set the style.

Cheers

2021-11-19 13-48-33
Saurabh Sengar
2021-10-17 12-36-16
Amreen Shaikh
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.