dataview tiles with html button

Hello, I have a problem , I can't capture event click of html button in tile.
Morever, I wan't dissociate the click in tile and the click in html button.

Please check the snippet :

Any ideas ?



  • check this
    you need to move onClick handlers into dataview config root

  • Perfect ;) Thanks

  • I have another question with last snippet, why the border of summary button isn't shown (defined in css (2px solid)) ?


  • edited August 8

    You can use !important or inline CSS to override the default border-width of 0px: or

  • Thanks :)

  • Hello , I wan't to change dynamically template tiles by tiles (hide summary button for one tile for example), so the template is defined for all tiles ...
    How it possible to do that ?

    $$("testDataview").define("template",XXXX) doesn't work for one tile


  • edited August 30

    Hey @romain, the only decent way to do this is to dynamically add a certain CSS class to the specified buttons, which would then in turn hide them.

    Here is an example: Note how we are adding the class hidden to the first button, and that class natureally makes the button invisible (opacity: 0).

  • Thanks for response , it gives me some ideas, in your example change dynamically button properties doesn't work because when I click on other tile , the changes desappears , please check my snippet :

    I have the same problem , when I click to another tile, the "running info" desappears and resume button come back.

  • Yep, the CSS will dynamically get replaced after the rerender of the dataview tile when it gets selected. As I mentioned before, the only proper way would be to dynamically add a CSS class with the required styles, as seen in the snippet above ( Please disregard the "Hide button" example, as it is not a correct way to handle this.

  • It is a problem for me , the declaration of dataview with tiles is dynamic (depends on data) and executed one time.
    After, all seconds I just wan't to replace button, title and message according to data without redraw dataview and tiles, the "hide button" example was a good idea for me :(

  • I tried to use your solution and update data all seconds to obtain the good result ;) thanks

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!