# Tree-view like selection using checkboxes for search filtering

**URL:** <https://forum.inductiveautomation.com/t/tree-view-like-selection-using-checkboxes-for-search-filtering/18450>\
**Category:** Ignition\
**Created:** [June 13, 2018, 3:30pm UTC](https://forum.inductiveautomation.com/t/tree-view-like-selection-using-checkboxes-for-search-filtering/18450 "2018-06-13T15:30:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [June 13, 2018, 6:27pm UTC](https://forum.inductiveautomation.com/t/tree-view-like-selection-using-checkboxes-for-search-filtering/18450/2 "2018-06-13T18:27:20Z")

</div>

It sounds like you want to be able to dynamically set the buttonDown event script that runs on a button nested inside a template in your repeater. It needs to be dynamic so that each button correctly manipulates the dataset in its own way, right?

If so, I think you'll find this thread helpful:

> [@Button Events Within Templates](http://forum.inductiveautomation.com/t/button-events-within-templates/14382/17):
>
> Here is how I do it. from java.awt.event import MouseEvent evt = MouseEvent(event.source.parent.parent,event.getID(),event.getWhen(),event.getModifiers(),event.x,event.y,event.clickCount,event.popupTrigger,event.button) event.source.parent.parent.dispatchEvent(evt) We take the originating event, from a label inside the template, and create a new instance of the mouse event, only changing the source. If we do not do this, then event.source will be equal to the triggering component inside the t…

---

_[View the full topic](https://forum.inductiveautomation.com/t/tree-view-like-selection-using-checkboxes-for-search-filtering/18450)._
