Possible solution to implement a select-all button for a listview while using listview control filters. Such that the select-all button selects only the filtered rows. - Mendix Forum

Possible solution to implement a select-all button for a listview while using listview control filters. Such that the select-all button selects only the filtered rows.

16

I have used a listview to display records. And client needs filter and select-all that should ONLY select the lines that show once the filter is applied. Listview controls does not help as it filters only on client. When I click the select-all btn, the server wont know what the filtered records on screen are. 

Here is a Possible solution to implement a select-all button for a listview while using listview control filters. Such that the select-all button selects only the filtered rows.

Can those listview control filter widgets be made configurable to take in a boolean attribute name of the record, which it could toggle whenever the filter selected that record?

Alternatively, can those listview control filter widgets be made configurable to take in a on-filtered nanoflow name that takes a list of record as parameter, which it could trigger whenever the filter selects those records. Similarly a on-hidden nanoflow name as property in each filter widget. This approach will be more generic. Example: to show any custom messages when a filter criteria selects a huge count of records or say selects a combination that is not allowed to appear together in same display.

asked
2 answers

Hey there! i know the question is asked more than 3 years ago but i encountered the same problem and i managed to create a workaround/hack for this to work. I added a test project to my github where multiselecting on the filtered set of records works. You can have a look at it if you want: https://github.com/reemster123/mendixListviewSelectAll.git

Short story of what i did: 

- Created a Javascript action which is triggered by a button. This JsAction finds all the filters and their input values and returns those as a list of objects in a nanoflow. With this list of objects i managed to create a generic xpath to retrieve all records for the entered filtervalues.

So for anyone in the current decade.. i hope it helps you out

 

Created

This would be good functionality.

I'll put it in other words: we want a special listview button that behaves the same as a grid button where multi select is possible. The microflow (or nanoflow) that is then called, would need a list parameter.

Created