Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
455
Show programmatically added filtersettings in FilterMenu
posted

We are using the FilterMenu to filter data in a XamGrid. In some scenarios we have to push ComparisonConditions into the RowFiltersCollection programmatically. Unfortunately these programmatically added conditons aren't shown in the FilterMenu. How can we add ComparisonConditions programmatically such that the user sees them in the FilterMenu and is able to narrow down the filter results based on the programmatically added conditions.

I have added a sample solution.

GridTestProject.zip
Parents
  • 2180
    Offline posted

    Hello,

    In order to add a filter condition to the filter menu you have to create a custom FilterOperand to be applied.

    After that create a FilterMenuTrackingObject with the custom filter operand and finally add the FilterMenuTrackingObject to the Children collection of the xamGrid’s column FilterColumnSettings build-in FilterMenuOperands. This can be done in the Loaded event handler of the xamGrid control.

    I’ve attached a modified project demonstrating this for the BankAccount column. Have in mind that this approach modifies the default behavior and is possible to affect the filtering in some way.

    Let me know if I may be of further assistance.

    ModifiedGridProject.zip
Reply Children
No Data