cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering table on checkbox state

0 Kudos

Hello Everyone,

I'd like to achieve a quite simple goal: to filter a table on a column that contains checkboxes. Three options would be to show checked, unchecked or all. Using the standard table handler (IF_WD_TABLE_METHOD_HNDL) the behavior is not surprisingly the following:filtering checked entries ('X') works fine, but filtering unchecked entries (' ') will show all entries as the filter criteria has initial value which is being interpreted as there is no filter criteria.

There must be a very simple solution for this. All ideas are welcome.

Thanks, regards,

Peter

Accepted Solutions (0)

Answers (1)

Answers (1)

ChrisPaine
Active Contributor
0 Kudos

Unfortunately - no simple solution.

But given that you are given the on_Filter event you can code one yourself...

sorry - but the standard implementation of IF_WD_TABLE_METHOD_HNDL~APPLY_FILTER doesn't allow you much wriggle room here - it retrieves the value of the filter and compares to "INITIAL" as you mentioned.

Can only suggest a custom implementation of your own filter method - you can't really override the attribute that is filtered easily - retrieved using CL_WD_ABSTRACT_TOGGLE->GET__PRIMARY_PROPERTY_BINDING for checkboxes - would be nice to redirect this to an alternate binding but that would cause other problems...

Would be interested if anyone else has already done this!

Chris