Customize Data Grid

0
I want a generic search for my data grid(not on any column specific) rather than the default search button given based on each column. How can i do it?
asked
2 answers
2

Bindu,

There are a number of search widgets in the appstore that provide alternatives to the standard search capability.  The one that works as you describe can be found here:  https://appstore.home.mendix.com/link/app/49364/Mendix/Grid-Search

Hope that helps,

Mike

**edit**

I just tested it in 7.11 and it works in my app.  Here is how I configured it.

Here it is on the page:

Here are the properties of the widget

Here is how the grid is configured to eliminate the default search button:

and here is a video of the search working:  https://youtu.be/RlnuI0vCi-M

answered
1

Hi Bindu,

This is not possible by default, as it is for a listview for instance. You can however work around this restriction. You can create your own 'custom search' by placing a input field above the datagrid on a 'surrounding' object, style it like a searchfield, and use its input in a datasource microflow when you can use to retrieve objects for your datagrid. Alternatively, you can put a new attribute on your object called '_SearchHelper' or something, that is filled using a beforeCommit action in which you concat all your attributes that you want to search on. For instance, $object/name + $object/place + $object/country resulting for instance in "BruceWayneGothamNepal". Then on your datagrid, use this field as your only search field.

Good luck!

answered