We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

How to set 'filter-setting' icon visible to all columns and measures?

Answered
Ravi asked on May 29, 2019

Hi Team,
I’m a Premium licensed user.

#1, UI - How to set 'filter-setting' icon(.fm-filter-icon) to all columns and measures?.
Note: We have illustrated this in attached screenshot. Get it.
 
#2, API - Also we need the API method to open this popup(#fm-filter-view) at custom?

Attachments:
openFilter.png

3 answers

Public
Vera Didenko Vera Didenko Flexmonster May 30, 2019

Hello, Ravi,
 
 
Thank you for your questions.
 
 
1) A filter setting icon can be added to all needed columns by using the customizeCell API call
 
2) We would like to point out that the provided openFilter() API call is responsible for opening the filter pop-up window for the specified hierarchy.
 
For example, the filter pop-up window for Category can be opened the following way:

flexmonster.openFilter("Category");

 
Feel free to write to us in case any further questions arise.
 
 
Best Regards,
Vera

Public
Ravi May 30, 2019

Hi Vera,
Thank you for your response.
 
For #1, Could you please make a sample that how can the filter-setting icon be added at the exact specified position(refer attached image).

And #2, We are clear with this, thank you!

Public
Vera Didenko Vera Didenko Flexmonster May 30, 2019

Hello, Ravi,
 
Thank you for your reply.
 
Please consider the following way how the filter setting icon can be added:
 
1) Define the customizeCell function:

function customizeCellFunction(cell, data) {
if (data.hierarchy && data.hierarchy.uniqueName == "Color" && data.member) {
cell.addClass("icon");
cell.addClass("iconSpace");
}
}

 
2) Define the specified CSS classes:

/* CSS class for adding the icon */

#fm-pivot-view #fm-grid-view div.icon {
background-image: url("https://i.postimg.cc/CRGFNd9g/settings-work-tool.png");
background-repeat: no-repeat;
background-position: 95% 50%;
background-size: 12px;
}

/* CSS class for making space for the icon in case the text is aligned to the right */

#fm-pivot-view #fm-grid-view div.iconSpace {
padding-right: 20px !important;
}

 
Here is a JSFiddle example for illustration.
 
Please let us know if this works for you.
 
We are looking forward to hearing from you.
 
Best Regards,
Vera 

Please login or Register to Submit Answer