SmartClient_v120p_2020-01-08_PowerEdition
I have a client that would like to build some filters for a ListGrid using the FilterBuilder, but have the option of toggling filter clauses in order to specify whether or not they should be included in the grid filtering. In essence, they want to be able to disable/enable each filter clause instead of having to remove and then re-add some common filters that they use.
I thought that I could accomplish this by using isc.defineClass to create a subclass of FilterBuilder. I have two scenarios that I'm considering.
One thought was to add a disable button and the attributes/functions I need to make that work. However, after searching around a bit, I could not find an example of how that could be done (adding a disable button to the FilterBuilder component). Are there examples or documentation somewhere that I could reference in order to accomplish this? I see that the addButton, removeButton, and subClauseButton are AutoChildren. So, would this even be possible to do?
Another thought was to override the removeClause function to capture what that clause is when they remove it and put it in a list in memory for them to easily retrieve and re-add. Although, this could get quite complicated with the AdvancedFilter and they would then have to specify where in the nested clause to add it back in.
The FilterBuilder is quite nice and I would hate to have to implement a custom solution to handle this situation.
Any thoughts, suggestions, or guidance on accomplishing this would be greatly appreciated.
I have a client that would like to build some filters for a ListGrid using the FilterBuilder, but have the option of toggling filter clauses in order to specify whether or not they should be included in the grid filtering. In essence, they want to be able to disable/enable each filter clause instead of having to remove and then re-add some common filters that they use.
I thought that I could accomplish this by using isc.defineClass to create a subclass of FilterBuilder. I have two scenarios that I'm considering.
One thought was to add a disable button and the attributes/functions I need to make that work. However, after searching around a bit, I could not find an example of how that could be done (adding a disable button to the FilterBuilder component). Are there examples or documentation somewhere that I could reference in order to accomplish this? I see that the addButton, removeButton, and subClauseButton are AutoChildren. So, would this even be possible to do?
Another thought was to override the removeClause function to capture what that clause is when they remove it and put it in a list in memory for them to easily retrieve and re-add. Although, this could get quite complicated with the AdvancedFilter and they would then have to specify where in the nested clause to add it back in.
The FilterBuilder is quite nice and I would hate to have to implement a custom solution to handle this situation.
Any thoughts, suggestions, or guidance on accomplishing this would be greatly appreciated.
Comment