Datagrid 2 search toggle

0
In datagrid 1 there was an option to have a search toggle to only show the search bars when clicked. I am looking to have this same functionality in Datagrid 2. Is this possible withouth having to implement a lot of custom functionality? My current solution would be to have the datagrid in a Dataview, changing a boolean attribute with a button, which in turn controls the visibility of the filters. However, this is not a scalable solution as it would be a lot of work to apply and maintain this for all grids in the app. 
asked
3 answers
1

Hello Sander,

Recently I have also this need of search bar in datagrid2. And I got a nice solution which may help you or other programmers.

Firstly, we can use the 'Group Box' which is collapsible as our search bar, visiblely this one is so similar to that of datagrid.SearchBar.png

Then, to realize the 'search' functionality we can add a helper entity no persistable, and in the search bar above we change the attribute information of this helper entity, in addition we set the datagrid 's data source as XPath in which we restrict our data by comparing with the helper entity.

HelperEntity.pngXPath.pngDataGrid2Structure.png

answered
0

Hi Sander

     There is no built-in feature to toggle the visibility of the search filters like in datagrid 1, you can achieve this by only custom functionality.

answered
0

Hello Sander

 

I think this is useful to you!

 

https://community.mendix.com/link/space/widgets/questions/129588

answered