How to include a checkbox into DataGrids Search field

0
Hi there, In order to meet my client's demand, I use a checkbox instead of Drop-down for boolean search condition. I'm happy if I could include a checkbox into DataGrid's search field , and set a boolean type attribute to the checkbox , and search with its constraint. Of course I know a DataGrid widget doesn't allow to include a checkbox into search field. So I created an entity (to input a search condition) and created a microflow (to retrieve a search result) instead of using DataGrid's search field and search button. Does anyone have similar experience? If there are, how did you solve it? I'm glad if you could give me any advice.   ***** EDIT 2018/09/11 ***** According to the document , Enumeration-Checkbox is valid for local Enums and Booleans attribute. https://appstore.home.mendix.com/link/app/49364/#enumeration-checkbox But when I set a boolean value to Attribute of behavior, I get a following error.. Could not create widget GridSearch.widget.EnumCheckbox Cannot read property 'length' of null TypeError: Cannot read property 'length' of null at O.(anonymous function).E._populateEnumOptions (http://localhost:8079/widgets/GridSearch/widget/EnumCheckbox.js?636722566563592631:79:36) at O.(anonymous function).E.postCreate (http://localhost:8079/widgets/GridSearch/widget/EnumCheckbox.js?636722566563592631:36:9) at Object.advice (http://localhost:8079/mxclientsystem/mxui/mxui.js?636722566563592631:1:54160) at O.(anonymous function).E.a [as postCreate] (http://localhost:8079/mxclientsystem/mxui/mxui.js?636722566563592631:1:53945) at O.(anonymous function).E.create (http://localhost:8079/mxclientsystem/mxui/mxui.js?636722566563592631:1:368426) at O.(anonymous function).E.postscript (http://localhost:8079/mxclientsystem/mxui/mxui.js?636722566563592631:1:367646) at new O.(anonymous function).E (http://localhost:8079/mxclientsystem/mxui/mxui.js?636722566563592631:1:77560) at http://localhost:8079/mxclientsystem/mxui/mxui.js?636722566563592631:1:420292 at Object.forEach (http://localhost:8079/mxclientsystem/mxui/mxui.js?636722566563592631:1:30397) at u (http://localhost:8079/mxclientsystem/mxui/mxui.js?636722566563592631:1:419918) Could you let me know if I am missing something.  ************************* Thanks in advance! Satomi
asked
2 answers
1

Hi Satomi,

Your findings are correct: in fact the EnumCheckbox widget did not properly support booleans even though the documentation said it did. I've just committed v3.0.1 here with proper support for booleans. Note that the widget name in the modeler also changed to "Checkbox - Enum/Boolean".

answered
0

Did you see this widget in the appstore: https://appstore.home.mendix.com/link/app/49364/Mendix/Grid-Search

I have not used it myself extensively but it gives you the option of using checkboxes in the search.

Regards,

Ronald

 

answered